Application Basic Authentication Groups
Directory Structure
|-- basic_auth_groups/
|-- groups.yaml
Each YAML file contains the configuration for one or more basic authentication groups for the application.
Configuration Description
Each basic authentication group configuration is an object containing the following parameters:
Parameter | Data Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the authentication group, which is also its unique identifier |
label | string | No | The label of the authentication group, used to describe the group |
users | array | Yes | The list of users in this group |
users Configuration
Parameter | Data Type | Required | Description |
---|---|---|---|
username | string | Yes | Username |
password | string | Yes | User password |
Configuration Example
---
- name: hello
label: 'world.'
users:
- username: 'username1'
password: 'password1'
- username: 'username2'
password: 'password2'
- username: 'username3'
password: 'password3'
This configuration defines a basic authentication group named “hello” with three users.
Usage Example
Update configuration to OpenResty Edge:
edge-config https://192.168.1.1 -s -t 2051e780-1897-4ea0-92b4-2c2f0169aa94 -l basic_auth_groups -i /root/oredge-configs -d test.com
Export configuration from OpenResty Edge:
edge-config -u https://192.168.1.1 -s -t 2051e780-1897-4ea0-92b4-2c2f0169aa94 -E -l basic_auth_groups -d test.com
Cleanup Basic Auth Group from OpenResty Edge:
edge-config -u https://192.168.1.1 -s -t 2051e780-1897-4ea0-92b4-2c2f0169aa94 -c -l basic_auth_groups -d test.com
The above examples all use -l basic_auth_groups
to specify that only configurations related to the Basic Auth Group will be operated.
Notes
Each basic authentication group must have a unique name.
Usernames and passwords cannot be empty or blank strings.
The label field is optional but can be used to add descriptive information to the basic authentication group.
When importing configurations, the tool will first check the validity of the configuration before performing add or update operations.
If a user is deleted from the configuration, the tool will automatically remove that user from the authentication group.
If an authentication group is deleted from the configuration, the tool will automatically remove that group from the application.
When exporting configurations, user information is not exported by default. If you need to export user information, set the
export_users
parameter toTrue
.the exported configuration will not include actual password information for security reasons.