Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: Add how-to guides for Entra ID #14925

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

markylaing
Copy link
Contributor

When Entra ID is configured as the OIDC provider for LXD, it works for the UI only. We can use Keycloak as a broker to support it for both the CLI and UI for now. This PR adds tutorials for both.

Note: To test this you will need

  1. Access to an Entra ID tenant.
  2. Access to a realm in Keycloak that is running HTTPS and accessible from LXD.

For the second point, I did this by running it in podman with self-signed certs using the following:

$ mkdir keycloak
$ openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -sha384 -keyout keycloak/keycloak.key -nodes -out keycloak/keycloak.crt -days 1 -subj "/CN=127.0.0.1" -addext "subjectAltName=IP:127.0.0.1"
$ chmod 660 keycloak/keycloak.key # Needed so Keycloak can read the key file in the container
$ cat keycloak/keycloak.{crt,key} > keycloak/keycloak.pem
$ cp keycloak/keycloak.pem /etc/ssl/certs/ # Needed so LXD will trust Keycloaks certificate.
$ sudo systemctl restart snap.lxd.daemon # Not needed if OIDC was not previously used.
$ podman run -p 9443:8443 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -v /home/mark/keycloak/keycloak-keys:/tmp/keycloak-keys -e KC_HTTPS_CERTIFICATE_FILE=/tmp/keycloak-keys/keycloak.crt -e KC_HTTPS_CERTIFICATE_KEY_FILE=/tmp/keycloak-keys/keycloak.key quay.io/keycloak/keycloak:26.1.0 start-dev

@markylaing markylaing added the Documentation Documentation needs updating label Feb 5, 2025
@markylaing markylaing self-assigned this Feb 5, 2025
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have those pngs been minimised in size btw?

@markylaing
Copy link
Contributor Author

Have those pngs been minimised in size btw?

They're just screenshots (a couple have been edited to blur sensitive info). How should I minimise?

@markylaing markylaing force-pushed the entra-id-instructions branch from 80627f2 to 87c4b89 Compare February 5, 2025 17:01
@markylaing
Copy link
Contributor Author

I've compressed them all now with optipng

doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
doc/howto/oidc_entra_id.md Outdated Show resolved Hide resolved
@minaelee minaelee changed the title Doc: Add tutorials for Entra ID Doc: Add how-to guides for Entra ID Feb 5, 2025
@markylaing markylaing force-pushed the entra-id-instructions branch from 87c4b89 to d54e899 Compare February 6, 2025 10:01
@markylaing
Copy link
Contributor Author

@minaelee Thanks for the speedy review! I've addressed all of your comments. I've also reworked that last section (the warning) to give an overview of the caveats and link to the Keycloak documentation. Could you please re-review? Thanks :)

@markylaing markylaing force-pushed the entra-id-instructions branch from fb10a80 to 6c94b3a Compare February 6, 2025 12:11
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tomponline tomponline merged commit 0c30d76 into canonical:main Feb 6, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants