feat(cli): rudimentary support for http authentication#165
Merged
tilowiklundSensmetry merged 14 commits intomainfrom Feb 2, 2026
Merged
feat(cli): rudimentary support for http authentication#165tilowiklundSensmetry merged 14 commits intomainfrom
tilowiklundSensmetry merged 14 commits intomainfrom
Conversation
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
4f117af to
69dd27b
Compare
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
436fc24 to
ec45ddd
Compare
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
1dd6d85 to
90f61e1
Compare
92b2ed3 to
9a49a0a
Compare
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
Collaborator
victor-linroth-sensmetry
left a comment
There was a problem hiding this comment.
Minor editorial things. Otherwise things seem fine.
Co-authored-by: Victor Linroth <victor.linroth@sensmetry.com> Signed-off-by: Tilo Wiklund <75035892+tilowiklundSensmetry@users.noreply.github.com>
Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
andrius-puksta-sensmetry
approved these changes
Feb 2, 2026
Collaborator
andrius-puksta-sensmetry
left a comment
There was a problem hiding this comment.
Looks good.
simonas-drauksas-sensmetry
pushed a commit
that referenced
this pull request
Feb 3, 2026
Extends #165 with bearer token authentication. Configured by environment variables ``` SYSAND_CRED_<X> = <PATTERN> SYSAND_CRED_<X>_BEARER_TOKEN = <TOKEN> ``` --------- Signed-off-by: Tilo Wiklund <tilo.wiklund@sensmetry.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MR implements the basic infrastructure for adding authentication to HTTP requests (to indices, project source, ...). It is an intermediate MR to #157, which intends to bring more complete support, both in terms of supported authentication schemes and configurability.
This MR only implements:
The CLI looks for triplets of environment variables following the pattern
SYSAND_CRED_<X>,SYSAND_CRED_<X>_BASIC_USER,SYSAND_CRED_<X>_BASIC_PASS. The<X>part is arbitrary, but every<X>has to appear either not at all, or for all three patterns. The first variable is a glob pattern to match URLs to allow authentication for, while the other two provide the actual credentials.Example
Would allow the use of
bar:bazas credentials for urls such ashttps://www.foo.com/a/b/c,https://index.foo.com/hey.kpar, ...Credentials are only actually sent if an initial request generates a 4xx status. The strictly correct behaviour here would be to try sending credentials only in response to an explicit
401withWWW-Authenticateheader, but this would, I believe, be incompatible with using, for example, private GitLab/GitHub pages.