Skip to content

Commit 84a6c76

Browse files
authored
Merge pull request ceph#60440 from rhcs-dashboard/add-oauth2-sso-doc
doc: mgr/dashboard: add OAuth2 SSO documentation Reviewed-by: Anthony D'Atri <[email protected]> Reviewed-by: Afreen Misbah <[email protected]>
2 parents 142c5be + 30dc60b commit 84a6c76

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

doc/mgr/dashboard.rst

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ The dashboard provides the following features:
4343
after the first login or after a configurable time period. See
4444
:ref:`dashboard-user-role-management` for details.
4545
* **Single Sign-On (SSO)**: The dashboard supports authentication
46-
via an external identity provider using the SAML 2.0 protocol. See
47-
:ref:`dashboard-sso-support` for details.
46+
via an external identity provider using the SAML 2.0 protocol or thse OAuth2 protocol. See
47+
:ref:dashboard-saml2-sso-support and :ref:dashboard-oauth2-sso-support for details.
4848
* **SSL/TLS support**: All HTTP communication between the web browser and the
4949
dashboard is secured via SSL. A self-signed certificate can be created with
5050
a built-in command, but it's also possible to import custom certificates
@@ -711,10 +711,10 @@ If no value is set for that option, it will simply fall back to the value of the
711711
GRAFANA_API_URL option. If set, it will instruct the browser to use this URL to
712712
access Grafana.
713713

714-
.. _dashboard-sso-support:
714+
.. _dashboard-saml2-sso-support:
715715

716-
Enabling Single Sign-On (SSO)
717-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
716+
Enabling SAML2 Single Sign-On (SSO)
717+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
718718

719719
The Ceph Dashboard supports external authentication of users via the
720720
`SAML 2.0 <https://en.wikipedia.org/wiki/SAML_2.0>`_ protocol. You need to
@@ -775,6 +775,50 @@ To enable SSO:
775775

776776
ceph dashboard sso enable saml2
777777

778+
.. _dashboard-oauth2-sso-support:
779+
780+
Enabling OAuth2 Single Sign-On (SSO)
781+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
782+
783+
The Ceph Dashboard supports external authentication of users via the
784+
`OAuth <https://en.wikipedia.org/wiki/OAuth>`_ protocol. You need to
785+
have :ref:`cephadm` enabled as your orchestrator with an active
786+
:ref:`deploy-cephadm-mgmt-gateway` and :ref:`deploy-cephadm-oauth2-proxy` services.
787+
788+
From the IDP of choice, Keycloak is the current recomendation and tested solution,
789+
configure the IDP's client used in the `oauth2-proxy` service configuration to validate the following redirect URLs
790+
for login_url: `https://<host_name>|<IP_address>/oauth2/callback` and
791+
the following logout_url: `https://<host_name>|<IP_address>/ /oauth2/sign_out`
792+
793+
Again, from the IDP, we will need a user with a valid role, this user will be the one to perform
794+
authorization against, we can create a role like: 'administator' to give admin level access to the user.
795+
796+
Make certain that the ``enable_auth`` flag has been included in the ``ceph orch
797+
apply mgmt-gateway`` command and that it has been set to ``true`` by running a
798+
command of the following form:
799+
800+
.. prompt:: bash $
801+
802+
ceph orch apply mgmt-gateway --enable_auth=true --placement=<ceph-node-02>
803+
804+
To disable SSO:
805+
806+
.. prompt:: bash $
807+
808+
ceph dashboard sso disable
809+
810+
To check if SSO is enabled:
811+
812+
.. prompt:: bash $
813+
814+
ceph dashboard sso status
815+
816+
To enable SSO:
817+
818+
.. prompt:: bash $
819+
820+
ceph dashboard sso enable oauth2
821+
778822
.. _dashboard-alerting:
779823

780824
Enabling Prometheus Alerting

0 commit comments

Comments
 (0)