credential chain - #464
Conversation
3b2b051 to
f8d0e25
Compare
f8d0e25 to
bda151d
Compare
bda151d to
3c8b255
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #464 +/- ##
==========================================
+ Coverage 24.67% 29.09% +4.42%
==========================================
Files 134 140 +6
Lines 18337 19809 +1472
==========================================
+ Hits 4525 5764 +1239
- Misses 13335 13462 +127
- Partials 477 583 +106
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3c8b255 to
f243f41
Compare
| // Verify the user is authenticated before performing any local side effects. | ||
| if _, err := s.GetCurrentUser(); err != nil { | ||
| return breverrors.WrapAndTrace(err) | ||
| } |
There was a problem hiding this comment.
Only do this if we're in the normal non-key mode?
There was a problem hiding this comment.
this should really be something like "isAuthenticated". I'll fix this with a better sentinel.
a7dfe8c to
92c34a0
Compare
Rebased onto pr1-register-resiliency (post ssh-certs uptake). - BREV_ACCESS_KEY renamed to BREV_API_KEY (never released); all access-key identifiers and messages renamed to API key - Env-key orgs resolve in real time from the backend: the key is bound to exactly one org server-side, so no persisted org is consulted and staleness is impossible. Established logins keep persisted org behavior (APIKeyOrgID / active-org cache) - Single-org invariant hoisted to auth.SingleOrgForAPIKey, shared by register and the general resolution path - GetActiveOrganizationOrNil branches on credential source; env path returns the full org (name included) without a second GetOrganization round-trip - Register with no env key and no persisted credential now prompts the device-flow login (externalNodeAuth fallback) instead of erroring; tokens stay in memory, the login email is cached for pre-fill - Register tests moved/renamed to the APIKey convention
92c34a0 to
6944cc9
Compare
There was a problem hiding this comment.
this is very stupid and all because we do a singular automatic retry in our resty client, which prints errors automatically/uncontrollably.
I'd like to remove that, but it is a nice feature to try automatically renew stale creds, so I left that and this.
Uh oh!
There was an error while loading. Please reload this page.