mash-playbook/docs/services/apisix-dashboard.md
2024-01-23 15:09:25 +02:00

2.9 KiB

APISIX Dashboard

APISIX Dashboard is a web UI for APISIX Gateway.

It works by directly editing the etcd database that APISIX Gateway stores its data in.

Dependencies

This service requires the following other services:

  • a Traefik reverse-proxy server
  • an etcd key-value store
  • (optional) APISIX Gateway - there's no point in administrating APISIX Gateway configuration stored in etcd without having an APISIX Gateway instance to initialize and consume it

Configuration

To enable this service, add the following configuration to your vars.yml file and re-run the installation process:

########################################################################
#                                                                      #
# apisix_dashboard                                                     #
#                                                                      #
########################################################################

apisix_dashboard_enabled: true

apisix_dashboard_hostname: dashboard.api.example.com

# A strong secret for JWT authentication
apisix_dashboard_config_authentication_secret: ''

apisix_dashboard_config_authentication_users:
  - username: admin
    password: password-here

########################################################################
#                                                                      #
# /apisix_dashboard                                                    #
#                                                                      #
########################################################################

If you'd like to do something more advanced, the ansible-role-apisix-dashboard Ansible role is very configurable and should not get in your way of exposing ports or configuring arbitrary settings.

Take a look at its default/main.yml file for available Ansible variables you can use in your own vars.yml configuration file.

URL

In the example configuration above, we configure APISIX Dashboard to expose itself at: https://dashboard.api.example.com

Authentication

The example above uses the built-in login page of APISIX Dashboard with a list of users is defined via apisix_dashboard_config_authentication_users.

APISIX Dashboard also supports OpenID Connect providers. It can be enabled and configured via various apisix_dashboard_config_oidc_* Ansible variables.

Usage

After installation, you can visit the APISIX Dashboard URL and authenticate with a credential as specified in apisix_dashboard_config_authentication_users. If you've enabled OpenID Connect, you may also be able to authenticate with that.