Skip to content

Credential api use of tokens#1913

Open
yoks wants to merge 4 commits into
NVIDIA:mainfrom
yoks:credential-api-use-of-tokens
Open

Credential api use of tokens#1913
yoks wants to merge 4 commits into
NVIDIA:mainfrom
yoks:credential-api-use-of-tokens

Conversation

@yoks
Copy link
Copy Markdown
Contributor

@yoks yoks commented May 23, 2026

Description

First phase of SessionTokens API support.

Enforces GetBmcCredentials to use SessionService tokens, meaning if BMC does not support Session, API will error out.

API would first get spiffe identifier of the calling services, then try to rotate token, meaning if there is token in database (there is new table which stored token IDs), it will revoke old token and issue new one. If there is no token, it would just issue new token. Clients expected to call this api to rotate expired tokens themselves (on auth failure).

Another major change is the begging of movent of AvoidLockout circuit breaker to this function, as in future, this should be only place what handles Basic credentials. Auth tokens themselvels could cause lockout. This also why we preffer to not share credentials at all (to consilidate this CircuitBreaker behavior here).

Should in general, work for Sharded envs, but it is preffered what there is specific API instances work with specific set of BMC macs to avoid races/simultanious refreshes and avoid DB locks.

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Implements big chunk of: #460

Should finaly fix this bug for good: #1292

Breaking Changes

  • This PR contains breaking changes
    Credentials API no longer returns passwords. It would explicitly not work with BMC which do not support SessionService. We can add flag in future to make exception for that.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@yoks yoks requested a review from a team as a code owner May 23, 2026 02:08
@yoks yoks requested a review from Matthias247 May 23, 2026 02:09
yoks added 2 commits May 22, 2026 19:21
Signed-off-by: ianisimov <ianisimov@nvidia.com>
Signed-off-by: ianisimov <ianisimov@nvidia.com>
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.

1 participant