Skip to content

Commit

Permalink
Add system token header to query SCC subscriptions (bsc#1219855)
Browse files Browse the repository at this point in the history
when a system was cloned, SCC falls back to the first system ever
registered for determining subscriptions. passing in the system
token should help with that.
  • Loading branch information
dirkmueller committed Feb 26, 2024
1 parent 2907f4f commit 2c48a4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func requestRegcodes(data SUSEConnectData, credentials Credentials) ([]string, e
req.URL.Path = "/connect/systems/subscriptions"

auth := url.UserPassword(credentials.Username, credentials.Password)
if credentials.SystemToken != "" {
req.Header.Add("System-Token", credentials.SystemToken)
}
req.URL.User = auth

resp, err := client.Do(req)
Expand Down

0 comments on commit 2c48a4d

Please sign in to comment.