-
Notifications
You must be signed in to change notification settings - Fork 364
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
ADR 1: Use secret types to select the authentication scheme #5110
Conversation
990cb15
to
e98c3de
Compare
|
||
The `authorization` entry is used as is, with its content placed directly into | ||
the `Authorization` header. For example, a secret like the following will make | ||
Autopilot set the `Authorization` header to `Bearer abc123def456ghi789jkl0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow we lost the example so the "following" part here makes no sense anymore (maybe it should be "previous" now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it has to be reversed 🙈
`InsecureSkipTLSVerify` on a Go HTTP client. | ||
- The `InsecureSkipTLSVerify` property will be valid for both `oci://` and | ||
`https://` protocols. | ||
`https://` protocols. It has no effect for the `http://` protocol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add some notes here regarding the new oci+http
introduced by #5107 as well.
e98c3de
to
5fded92
Compare
This pull request has merge conflicts that need to be resolved. |
The current version of this ADR proposes to use one secret type per protocol, which is somewhat limiting. It would be reasonable to consider the use of a basic auth secret for authentication to an OCI registry, for instance. Also, the use of the secret type to select the authentication scheme would help to reduce any potential ambiguity. In the case of OCI registries, the ADR already explicitly mentions the dockerconfigjson secret type. For HTTP[S], it falls back on the Opaque type and attempts to figure out the appropriate authentication method based on the contents of the secret. This is inconsistent with the way it works for OCI, and can be made consistent by adding a custom secret type for the case that k0s wants to cover, but for which there's no predefined type available upstream. Signed-off-by: Tom Wieczorek <[email protected]>
5fded92
to
b3a87de
Compare
Description
This is a follow-up to #4524 (comment) and #4524 (comment). I think using secret types more could help in making the API better. WDYT?
The current version of this ADR proposes to use one secret type per protocol, which is somewhat limiting. It would be reasonable to consider the use of a basic auth secret for authentication to an OCI registry, for instance. Also, the use of the secret type to select the authentication scheme would help to reduce any potential ambiguity.
In the case of OCI registries, the ADR already explicitly mentions the dockerconfigjson secret type. For HTTP[S], it falls back on the Opaque type and attempts to figure out the appropriate authentication method based on the contents of the secret. This is inconsistent with the way it works for OCI, and can be made consistent by adding a custom secret type for the case that k0s wants to cover, but for which there's no predefined type available upstream.
Type of change
How Has This Been Tested?
Checklist: