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

oidc: Reimplement userinfo for fine-grained error handling #31

Merged
merged 5 commits into from
Jul 13, 2020

Commits on Jul 13, 2020

  1. oidc: Re-implement UserInfo for fine-grained error handling

    The `UserInfo` function of the `go-oidc` library doesn't expose details
    about the HTTP response from the OIDC Provider, if the request fails.
    This makes it impossible to detect if the returned code is `401`, in
    which case the user's session at the AuthService should be revoked.
    
    Initially, we were revoking the session on any error, but this caused
    undesired revocations because of errors we hadn't thought of (context
    cancellation).
    
    Reimplement the call to UserInfo and expose HTTP response details to the
    caller, so they can make a sensible decision.
    
    Github-PR: #31
    
    Signed-off-by: Yannis Zarkadas <[email protected]>
    yanniszark committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    664bba3 View commit details
    Browse the repository at this point in the history
  2. e2e: Fix the case of having multiple kubeconfig files

    Having multiple kubeconfig files confuses k3d, which doesn't know what
    kubeconfig file to use. Instruct it to always use the
    `$HOME/.kube/config` file.
    
    Github-PR: #31
    
    Signed-off-by: Yannis Zarkadas <[email protected]>
    yanniszark committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    827f222 View commit details
    Browse the repository at this point in the history
  3. tests: Add unit test for UserInfo

    Add a unit test for the UserInfo function to make sure that we can get
    back the request info when an error occurs.
    
    Github-PR: #31
    
    Signed-off-by: Yannis Zarkadas <[email protected]>
    yanniszark committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    bdcaa64 View commit details
    Browse the repository at this point in the history
  4. README: Add go to e2e dependencies

    Signed-off-by: Yannis Zarkadas <[email protected]>
    yanniszark committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    ff99014 View commit details
    Browse the repository at this point in the history
  5. e2e: Make sure Go's testing cache doesn't skip the test

    Signed-off-by: Yannis Zarkadas <[email protected]>
    yanniszark committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    e48e130 View commit details
    Browse the repository at this point in the history