Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Strip trailing slashes from idp-issuer-url to avoid 404 on refreshing token - #124

Closed
andyhd wants to merge 1 commit into
kubernetes-client:masterfrom
andyhd:master
Closed

andyhd wants to merge 1 commit into
kubernetes-client:masterfrom
andyhd:master

Conversation

@andyhd

@andyhd andyhd commented Mar 21, 2019

Copy link
Copy Markdown

My idp-issuer-url ends with a trailing slash for some reason, and KubeConfigLoader._refresh_oidc concatenates it with /.well-known/openid-configuration to generate a URL that 404s.

I've just stripped the trailing slash to fix this.

@k8s-ci-robot
k8s-ci-robot requested review from mbohlool and yliaog March 21, 2019 12:12
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 21, 2019
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andyhd
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: mbohlool

If they are not already assigned, you can assign the PR to them by writing /assign @mbohlool in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 21, 2019
@andyhd

andyhd commented Mar 21, 2019

Copy link
Copy Markdown
Author

I've signed the CLA

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 21, 2019
Avoids 404 when constructing a URL with `//.well-known/openid-configuration`. This happens if `idp-issuer-url` has a trailing slash - as seems to be the case with my Auth0 OIDC provider Kubernetes config.
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #124 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #124   +/-   ##
=======================================
  Coverage   92.84%   92.84%           
=======================================
  Files          13       13           
  Lines        1328     1328           
=======================================
  Hits         1233     1233           
  Misses         95       95
Impacted Files Coverage Δ
config/kube_config.py 86.37% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c03b3b...299ffc8. Read the comment docs.

@andyhd

andyhd commented Jun 13, 2019

Copy link
Copy Markdown
Author

/assign @mbohlool

@fejta-bot

Copy link
Copy Markdown

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2019
@roycaihw

roycaihw commented Oct 1, 2019

Copy link
Copy Markdown
Member

/assign @fabianvf

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@roycaihw: GitHub didn't allow me to assign the following users: fabianvf.

Note that only kubernetes-client members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @fabianvf

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@roycaihw

roycaihw commented Oct 1, 2019

Copy link
Copy Markdown
Member

please add a test case for this fix

@fejta-bot

Copy link
Copy Markdown

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 31, 2019
@fejta-bot

Copy link
Copy Markdown

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@fejta-bot: Closed this PR.

Details

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants