Global Basic Authentication Groups
Directory Structure
|-- global_basic_auth_groups/
|-- global_basic_auth_groups.yaml
The Yaml files can contain one or more global basic authentication groups.
Configuration Description
Parameter Name | Data Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the global basic authentication group, also its unique identifier |
label | string | No | The label of the global basic authentication group, used to describe the group |
users | array | Yes | The list of users in the group |
username | string | Yes | Username |
password | string | Yes | User password |
Configuration Example
---
- name: hello
users:
- username: 'username1'
password: 'password1'
- username: 'username2'
password: 'password2'
- username: 'username3'
password: 'password4'
- name: world
label: 'group 2'
users:
- username: 'username1'
password: 'password1'
- username: 'username2'
password: 'password2'
- username: 'username3'
password: 'password4'
This configuration defines two global basic authentication groups, each containing three users.
Usage Example
Update configuration to OpenResty Edge:
edge-config https://192.168.1.1 -s -t 2051e780-1897-4ea0-92b4-2c2f0169aa94 -l global_basic_auth_groups -i /root/oredge-configs
Export configuration from OpenResty Edge:
edge-config -u https://192.168.1.1 -s -t 2051e780-1897-4ea0-92b4-2c2f0169aa94 -E -l global_basic_auth_groups
In both examples, -l global_basic_auth_groups
specifies that only global basic authentication group-related configurations will be imported/exported.
The actual password information will not be exported when exporting configurations for security reasons.
Notes
Global basic authentication groups are a global configuration. Delete operations will not be performed when updating configurations to maintain compatibility with multiple local configurations.
When exporting configurations, if exporting user information is not specified, the user list will not be exported, and a warning message will be displayed.
Each global basic authentication group must have a unique name.
When importing configurations, usernames and passwords cannot be empty strings.
The label field is optional but can be used to add descriptive information to the global basic authentication group.
When importing configurations, the tool will first check the validity of the configuration before performing add or update operations.