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:

ParameterData TypeRequiredDescription
namestringYesThe name of the authentication group, which is also its unique identifier
labelstringNoThe label of the authentication group, used to describe the group
usersarrayYesThe list of users in this group

users Configuration

ParameterData TypeRequiredDescription
usernamestringYesUsername
passwordstringYesUser 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

  1. Each basic authentication group must have a unique name.

  2. Usernames and passwords cannot be empty or blank strings.

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

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

  5. If a user is deleted from the configuration, the tool will automatically remove that user from the authentication group.

  6. If an authentication group is deleted from the configuration, the tool will automatically remove that group from the application.

  7. When exporting configurations, user information is not exported by default. If you need to export user information, set the export_users parameter to True.

  8. the exported configuration will not include actual password information for security reasons.