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

Name of cert token based on site UID #1256

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

Conversation

DendoD96
Copy link
Contributor

@DendoD96 DendoD96 commented Nov 2, 2023

Try to resolve #1154 adding site UID to the token secret name.

if err != nil {
return err
}
secret, localOnly, err := cli.ConnectorTokenCreate(ctx, fmt.Sprintf("%s-%s", subject, siteConfig.Reference.UID), "")
Copy link
Member

Choose a reason for hiding this comment

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

Ideally we would separate the name used in the secret yaml from the subject used in the client certificate within that secret.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LGTM. I can move the concatenation of subject and site UID into ConnectorTokenCreate, but the function is called at several points in the code (e.g. newGateway and GatewayGenerateBundle). The alternative could be to change the signature of the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tokens created with type cert have a static name
2 participants