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 NameData TypeRequiredDescription
namestringYesThe name of the global basic authentication group, also its unique identifier
labelstringNoThe label of the global basic authentication group, used to describe the group
usersarrayYesThe list of users in the group
usernamestringYesUsername
passwordstringYesUser 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

  1. Global basic authentication groups are a global configuration. Delete operations will not be performed when updating configurations to maintain compatibility with multiple local configurations.

  2. When exporting configurations, if exporting user information is not specified, the user list will not be exported, and a warning message will be displayed.

  3. Each global basic authentication group must have a unique name.

  4. When importing configurations, usernames and passwords cannot be empty strings.

  5. The label field is optional but can be used to add descriptive information to the global basic authentication group.

  6. When importing configurations, the tool will first check the validity of the configuration before performing add or update operations.