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

docs: add oidc configuration with ory hydra #15126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edlerd
Copy link
Contributor

@edlerd edlerd commented Mar 7, 2025

Done

  • added how to configure ory hydra as login provider for the lxd ui

@github-actions github-actions bot added the Documentation Documentation needs updating label Mar 7, 2025
@edlerd edlerd force-pushed the doc-oidc-ory branch 2 times, most recently from ac7d775 to 0751eb8 Compare March 7, 2025 10:41

Now you can access the LXD UI with any browser and use {abbr}`SSO (single sign-on)` login. Create a user by signing up and complete the login process.

Users will have no permissions by default. You must set up {ref}`LXD authorization groups <manage-permissions>` to grant access to projects and instances. Map a LXD authorization group to the user. Note, that the user object in LXD will only be created on the first login of that user to LXD.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Users will have no permissions by default. You must set up {ref}`LXD authorization groups <manage-permissions>` to grant access to projects and instances. Map a LXD authorization group to the user. Note, that the user object in LXD will only be created on the first login of that user to LXD.
Users have no default permissions. You must set up {ref}`LXD authorization groups <manage-permissions>` to grant access to projects and instances. Map a LXD authorization group to the user. Note that the user object in LXD is only created on the first login of that user to LXD.

Copy link
Contributor

Choose a reason for hiding this comment

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

After following the steps, I opened the UI locally and tried Login with SSO. I received this error:

invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Requested audience 'https://pensive-beaver-sokgdnmdhu.projects.oryapis.com' has not been whitelisted by the OAuth 2.0 Client.

I set https://127.0.0.1:8443/oidc/callback for the Redirect URIs section. LXD UI version 5.21.3-ui-0.15. Using Firefox with cleared cache.

Copy link
Contributor Author

@edlerd edlerd Mar 10, 2025

Choose a reason for hiding this comment

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

The ORY interface is misleading here. We have to enter the redirect URL in the input field and then click add. I changed the description a bit to make this more clear. Same with the scope fields. Without clicking "Add", the values in the input field on creation are ignored.

There was another issue: We should not set an audience, which I updated below.

Co-authored-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
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.

2 participants