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

Warning about multiples kubeconfig with the same user #737

Merged
merged 5 commits into from
Mar 16, 2020

Conversation

jvanz
Copy link
Member

@jvanz jvanz commented Mar 10, 2020

Recently we have a customer trying to use multiples kubeconfig file with
the same user. This cause issue because after one of the machines with
the files refresh the OIDC token, the rest cannot refresh the token
anymore. This commit adds a warning about this situation.

Issue #735

jvanz and others added 2 commits March 10, 2020 14:58
Recently we have a customer trying to use multiples kubeconfig file with
the same user. This cause issue because after one of the machines with
the files refresh the OIDC token, the rest cannot refresh the token
anymore. This commit adds a warning about this situation.

Issue SUSE#735

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
@nkoranova
Copy link
Contributor

Great! Many thanks for the PR!
I thought that it would be an overly long warning and that it deserved it's own section. ;)
Other than that I have two main points I want to ask about:

  1. How do you know when the tokens need to be refreshed? Do you get some sort of notification or where can you check the "expiration date"? Does the user even need to do it, or is it done automatically?
  2. What is the solution to this problem? Are you supposed to use multiple users? How do you then keep track of them?

@nkoranova nkoranova self-requested a review March 11, 2020 10:08
@r0ckarong r0ckarong linked an issue Mar 11, 2020 that may be closed by this pull request
@r0ckarong r0ckarong added 4.2.0 AdminGuide Fix will change the Admin Guide v4 CaaSP v4 labels Mar 12, 2020
@r0ckarong r0ckarong added this to the Sprint 25 milestone Mar 12, 2020
@jvanz
Copy link
Member Author

jvanz commented Mar 13, 2020

Great! Many thanks for the PR!
I thought that it would be an overly long warning and that it deserved it's own section. ;)
Other than that I have two main points I want to ask about:

1. How do you know when the tokens need to be refreshed? Do you get some sort of notification or where can you check the "expiration date"? Does the user even need to do it, or is it done automatically?

It is done automatically. It is transparent for the user. There is no notification.

2. What is the solution to this problem? Are you supposed to use multiple users? How do you then keep track of them?

Use multiple users is a possible solution. But I'm not sure if it is the best one and I'm not aware of other options.

Adds a little doc about a simple workaround to the problem regarding to
the use of the same user in multiple kubeconfig files. The user can have
multiple user, each one in use in one kubeconfig

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
@nkoranova
Copy link
Contributor

Use multiple users is a possible solution. But I'm not sure if it is the best one and I'm not aware of other options.

@innobead could we please get some input from you for this solution? :)

@nkoranova nkoranova requested a review from innobead March 13, 2020 12:57
Copy link
Contributor

@innobead innobead left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution

@nkoranova
Copy link
Contributor

@jvanz and @innobead Thanks, this looks pretty good and almost ready to merge. I just have one more question. (Sorry if this is getting slightly annoying, I just want to make sure the user gets all the needed info. :))
We have told the user they should create multiple users for different kubeconfig files. They know how to add a new user and how to create a new kubeconfig file. How do they make sure that the kubeconfig file is added under that user?

@jvanz
Copy link
Member Author

jvanz commented Mar 16, 2020

We have told the user they should create multiple users for different kubeconfig files. They know how to add a new user and how to create a new kubeconfig file.

I believe so. @innobead suggested that for the customer. Furthermore, our support should help on that process.

How do they make sure that the kubeconfig file is added under that user?

To download the file the users need to access the gangway web page or use the cli to download the file. Thus, they need to insert the user credentials. But they can check the user in the kubeconfig file as well:

[...]
users:
- name: myuser
  user:
    auth-provider:
      config:
        client-id: oidc
        client-secret: <secret>
        id-token:  <something>
        idp-issuer-url: https://<ip>:<port>
        refresh-token: <token>
      name: oidc
[...]

@nkoranova
Copy link
Contributor

nkoranova commented Mar 16, 2020

Awesome, thanks. This is now ready to be merged. @r0ckarong Is there a reason not to merge it and publish this in 4.1.2?

@r0ckarong
Copy link
Contributor

Awesome, thanks. This is now ready to be merged. @r0ckarong Is there a reason not to merge it and publish this in 4.1.2?

If this is not tied to any particular version of dex or gangway I don't see why not.

@jordimassaguerpla Do you have any objections to merging this?

@jordimassaguerpla
Copy link
Member

Awesome, thanks. This is now ready to be merged. @r0ckarong Is there a reason not to merge it and publish this in 4.1.2?

If this is not tied to any particular version of dex or gangway I don't see why not.

@jordimassaguerpla Do you have any objections to merging this?

no objection.

@nkoranova nkoranova merged commit 582964a into SUSE:master Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AdminGuide Fix will change the Admin Guide v4 CaaSP v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentaton about user sessions in kubeconfig files
5 participants