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

Add 'check oidc-config' command #4146

Merged
merged 9 commits into from
Nov 27, 2023
Merged

Add 'check oidc-config' command #4146

merged 9 commits into from
Nov 27, 2023

Commits on Nov 24, 2023

  1. Add check oidc-config command

    The command validates a given OIDC configuration, either from a referenced
    Secret or from CLI flags. This will help users debug issues with Weave GitOps
    OIDC configuration as well as provide a way to validate a configuration before
    putting it on a cluster.
    
    The command consumes OIDC configuration from CLI flags or from a Secret on a
    cluster and sends the user through an OIDC authorization code flow. If it
    succeeds, the username and groups claims are logged to stdout. The command
    validates the Secret for missing fields and also prints all errors returned
    from the OIDC provider so that users know what went wrong.
    
    This will work out of the box with OIDC providers given they are configured to
    accept "http://localhost:9876" as a redirect URI.
    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    b806226 View commit details
    Browse the repository at this point in the history
  2. Use existing code for parsing ID token claims

    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    e87c73e View commit details
    Browse the repository at this point in the history
  3. Add --groups-claim flag to check oidc-config

    This commit also aligns the existing `--claim-username` flag with the
    K8s one and renames it to `--username-claim`.
    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    203b8b8 View commit details
    Browse the repository at this point in the history
  4. Better code documentation

    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    cdbda35 View commit details
    Browse the repository at this point in the history
  5. Add info about redirect URI to check oidc-config usage text.

    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    1c7d1fe View commit details
    Browse the repository at this point in the history
  6. Rebuild CLI reference to incorporate latest changes

    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    aea5640 View commit details
    Browse the repository at this point in the history
  7. Fix code style

    Max Jonas Werner committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    e370fe4 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Update generated files

    The generated files have been updated to reflect the updated version
    of the buf command.
    Max Jonas Werner committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    ca74e05 View commit details
    Browse the repository at this point in the history
  2. Fix unit test to align with library updates

    golang.org/x/oauth2 changed its error handling in v0.8.0
    (https://go-review.googlesource.com/c/oauth2/+/451076) to actually
    parse error responses and return the error code in the returned error
    variable.
    Max Jonas Werner committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    b4e58a2 View commit details
    Browse the repository at this point in the history