Skip to content

feat(auth): add azure/interactive browser authentication provider - #2862

Merged
Andriy Knysh (aknysh) merged 10 commits into
mainfrom
aknysh/feat-azure-browser-auth
Aug 5, 2026
Merged

Andriy Knysh (aknysh) merged 10 commits into
mainfrom
aknysh/feat-azure-browser-auth

Conversation

@aknysh

@aknysh Andriy Knysh (aknysh) commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

what

  • New azure/interactive provider kind: MSAL interactive browser authentication — authorization code + PKCE on a localhost redirect, the same flow az login uses (AcquireTokenInteractive). One command (atmos auth login) opens the browser, completes SSO, and mints Management/Graph/Key Vault tokens.
  • interactiveProvider embeds deviceCodeProvider, reusing the MSAL client, silent token acquisition (refresh tokens make repeat logins silent — no browser), token fan-out, and the Azure CLI cache write-back with the correct guest home account ID from fix(auth): prevent Azure CLI cache corruption for guest users #2861. Spec shape is identical to azure/device-code.
  • The shared machinery is parameterized by auth method: credentials persist auth_method: interactive, and the MSAL cache account_source mirrors az's own labels (authorization_code for the browser flow, device_code otherwise).
  • Docs: provider reference, Azure tutorial (interactive flow recommended for humans; device code reframed as fallback with the Conditional Access caveat), kind lists, blog post (azure-interactive-auth), shipped roadmap milestone, PRD (docs/prd/azure-interactive-auth.md), and the fix doc for fix(auth): prevent Azure CLI cache corruption for guest users #2861 (docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md).
  • Test coverage ≈92% of changed lines: two injection seams (acquireInteractive, checkInteractive) per the repo's DI convention, since the real interactive flow needs a live IdP and a browser; tests cover the success path, acquisition failure, and headless refusal against a sandboxed HOME.

why

  • Microsoft-managed Conditional Access policies now block the device code flow in many tenants, so azure/device-code increasingly fails; azure/cli requires a pre-existing az login session (two commands); azure/oidc is CI-only. Azure users had no one-command human login equivalent to aws/iam-identity-center.
  • The interactive browser flow carries full Conditional Access context (MFA, device state), so tenants allow it — and it uses the Azure CLI public client, which pre-authorizes localhost redirects.

why the name azure/interactive

"Interactive" is Microsoft's own term for this flow, not our invention:

  • MSAL's API for it is literally AcquireTokenInteractive, and Microsoft's flow taxonomy divides authentication into "interactive and non-interactive flows" — where "interactive" specifically means the browser-based authorization-code sign-in a user completes, as opposed to device code, silent, or client-credential flows.
  • Provider kinds in Atmos name the auth mechanism, not the UX: aws/iam-identity-center opens a browser too, but the kind names the mechanism; aws/saml treats the browser as a driver: option; gcp/workload-identity-federation names the federation mechanism. azure/interactive follows the same rule using the platform's own vocabulary.
  • Alternatives considered: azure/browser (self-explanatory but bakes UX into the kind name, contrary to the convention above) and a spec.flow: browser option on azure/device-code (avoids a new kind, but makes the kind name actively misleading when the flow isn't device code).

manual verification

Tested end to end in a real Entra tenant where the device code flow is blocked by a Microsoft-managed Conditional Access policy, with an operator who is a guest (B2B) user in that tenant. Starting from a fully wiped ~/.azure:

  1. One-command login — atmos auth login opened the default browser, SSO completed (no device code, no az login), and tokens were minted.
  2. Silent repeat login — running atmos auth login again succeeded without opening the browser (same token expiry), confirming refresh-token persistence.
  3. atmos auth whoami — reported provider, identity, subscription principal, tenant, and expiry.
  4. az CLI drop-in — az account show worked even though az login was never run, thanks to the Azure CLI-compatible cache write-back.
  5. Cache forensics — exactly one MSAL Account entry, labeled account_source: authorization_code (matching what az itself records), carrying the true home account ID. This is the guest-user case that used to corrupt the az cache before fix(auth): prevent Azure CLI cache corruption for guest users #2861.

Details in the PRD's Verification section (docs/prd/azure-interactive-auth.md).

references

Summary by CodeRabbit

  • New Features

    • Added Azure interactive browser authentication using authorization code + PKCE.
    • Supports silent sign-in from cached credentials, MFA, and Azure CLI compatibility.
    • Added the azure/interactive provider and browser sign-in prompts.
  • Bug Fixes

    • Prevented Azure CLI token-cache corruption for guest users.
    • Preserved authentication details across Azure sign-in methods.
  • Documentation

    • Updated Azure authentication guides, examples, and provider references.
    • Added guidance for Conditional Access scenarios, troubleshooting, and interactive authentication.

Adds a new `azure/interactive` provider kind implementing MSAL interactive
browser authentication (authorization code + PKCE on a localhost redirect)
-- the same flow `az login` uses, and MSAL's own name for it
(AcquireTokenInteractive).

Why a third user-auth kind: Microsoft-managed Conditional Access policies
now block the device code flow in many tenants (AADSTS 530035), and the
azure/cli provider requires a pre-existing `az login` session. The
interactive flow gives one-command `atmos auth login` that Conditional
Access allows, because the browser session carries full CA context.

- interactiveProvider embeds deviceCodeProvider, reusing the MSAL client,
  silent token acquisition (refresh tokens make repeat logins silent),
  Graph/KeyVault token fan-out, and the Azure CLI cache write-back with
  the correct guest home account ID.
- The shared machinery is parameterized by auth method: interactive
  credentials persist auth_method "interactive", and the MSAL cache
  account_source now mirrors az's own labels ("authorization_code" for
  the browser flow, "device_code" otherwise) instead of a hardcoded value.
- Verified end to end against a real tenant as a guest (B2B) user with
  device code blocked by policy: one command opens the browser, SSO
  completes, and afterwards the az CLI works without ever running
  `az login` -- the write-back reconstructs a valid az session, making
  atmos auth a drop-in replacement.

Docs: provider reference, Azure authentication tutorial (interactive flow
recommended for humans; device code reframed as fallback with the
Conditional Access caveat), auth kind lists, blog post
(azure-interactive-auth), a shipped roadmap milestone, and the fix doc
for #2861 (docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md).

Also includes the PRD (docs/prd/azure-interactive-auth.md) and test
coverage at ~92% of changed lines: the provider exposes two injection
seams (acquireInteractive, checkInteractive) per the repo's DI
convention, since the real MSAL interactive flow needs a live IdP and a
browser; tests cover the success path, acquisition failure, and headless
refusal against a sandboxed HOME.

Builds on the AuthMethod/HomeAccountID plumbing from #2861.

Co-Authored-By: Claude Fable 5 <[email protected]>
@aknysh
Andriy Knysh (aknysh) requested a review from a team as a code owner August 4, 2026 14:51
@atmos-pro

atmos-pro Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions github-actions Bot added the size/m Medium size PR label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@aknysh Andriy Knysh (aknysh) self-assigned this Aug 4, 2026
@aknysh Andriy Knysh (aknysh) added the minor New features that do not break anything label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b8df8ee-37b6-4e78-b880-7b629e969fc3

📥 Commits

Reviewing files that changed from the base of the PR and between d10e927 and d8f4267.

📒 Files selected for processing (5)
  • pkg/auth/cloud/azure/setup.go
  • pkg/auth/providers/azure/device_code_cache.go
  • pkg/auth/providers/azure/device_code_cache_test.go
  • pkg/auth/providers/azure/interactive_test.go
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (5)
  • website/src/data/roadmap.js
  • pkg/auth/providers/azure/interactive_test.go
  • pkg/auth/providers/azure/device_code_cache.go
  • pkg/auth/cloud/azure/setup.go
  • pkg/auth/providers/azure/device_code_cache_test.go

📝 Walkthrough

Walkthrough

The PR adds the azure/interactive browser authentication provider with authorization-code + PKCE flow. It updates MSAL cache metadata, registers the provider, adds tests, and updates Azure authentication documentation.

Changes

Azure interactive authentication

Layer / File(s) Summary
Authentication types and provider registration
pkg/auth/types/..., pkg/auth/factory/...
Adds interactive authentication constants and routes azure/interactive to the new provider.
Interactive provider implementation
pkg/auth/providers/azure/interactive.go, pkg/auth/providers/azure/device_code_ui.go
Adds configuration validation, silent token acquisition, browser authentication, resource-token acquisition, TTY checks, and browser prompts.
Authentication method and cache metadata
pkg/auth/providers/azure/device_code.go, pkg/auth/providers/azure/device_code_cache.go, pkg/auth/cloud/azure/setup.go
Tracks credential origin and maps it to the MSAL account_source value during Azure CLI cache updates.
Provider and cache validation
pkg/auth/providers/azure/*_test.go, pkg/auth/cloud/azure/setup_account_source_test.go
Tests provider construction, authentication, account-source mapping, guest-account cache entries, headless rejection, browser prompts, and client ID defaults.
PRD and cache-fix documentation
docs/prd/azure-interactive-auth.md, docs/fixes/...
Documents provider behavior, acceptance criteria, guest-account cache corruption, and recovery.
Provider documentation and examples
website/docs/..., website/blog/..., website/src/data/roadmap.js
Documents azure/interactive, updates Azure examples, and records browser authentication as the recommended user flow.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Atmos
  participant MSAL
  participant Browser
  participant AzureCLICache

  Atmos->>MSAL: attempt silent token acquisition
  MSAL-->>Atmos: cached tokens or no token
  alt no cached management token
    Atmos->>User: display browser prompt
    User->>Browser: complete authorization-code + PKCE sign-in
    Browser-->>MSAL: authorization code
    MSAL-->>Atmos: access token and home account ID
  end
  Atmos->>MSAL: acquire Graph and Key Vault tokens
  Atmos->>AzureCLICache: write tokens with authentication metadata
Loading

Possibly related PRs

Suggested reviewers: osterman

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the Azure interactive browser authentication provider.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aknysh/feat-azure-browser-auth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
pkg/auth/cloud/azure/setup_account_source_test.go (1)

11-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a table-driven mapping test.

Lines 13-15 test three mapping scenarios. Store the method and expected source in a test table. Run each case as a subtest.

As per coding guidelines, use table-driven tests for testing multiple scenarios.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/auth/cloud/azure/setup_account_source_test.go` around lines 11 - 16,
Refactor TestAccountSourceForAuthMethod into a table-driven test containing each
auth method and expected account source, then iterate over the cases with a
subtest for each mapping. Preserve the existing three scenarios and assertions
against accountSourceForAuthMethod.

Source: Coding guidelines

pkg/auth/providers/azure/interactive_test.go (1)

194-197: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the browser-prompt behavior.

TestDisplayBrowserPrompt passes when displayBrowserPrompt writes no text. Capture the UI writer and assert the title and browser status message. Remove the test if the UI output cannot be observed.

As per coding guidelines, test behavior rather than implementation and do not add coverage-only tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/auth/providers/azure/interactive_test.go` around lines 194 - 197, Update
TestDisplayBrowserPrompt to capture the UI writer output from
displayBrowserPrompt and add assertions verifying that the title and browser
status message are written correctly, rather than just checking that the
function does not panic. If the UI writer cannot be captured or the output
cannot be observed reliably, remove the test entirely as it would only provide
code coverage without testing actual behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md`:
- Around line 42-44: Update the AzureCredentials AuthMethod documentation to
include interactive alongside cli, device_code, and oidc, reflecting the
persisted auth_method value.

In `@docs/prd/azure-interactive-auth.md`:
- Around line 70-74: Adjust the continuation-line indentation in the
Authentication order section and the corresponding lines around the referenced
later section to use two-space multiples, including all listed continuation
lines. Preserve the document’s wording and list structure while satisfying the
editorconfig indentation check.

In `@website/docs/cli/configuration/auth/providers.mdx`:
- Around line 225-227: Update the guidance note near the azure provider
configuration to retain the device-code fallback: direct CI/CD and headless
workload users to azure/oidc, while directing browser-less human users to
azure/device-code when tenant policy permits it. Preserve the existing
interactive-terminal and browser requirement for azure/interactive and align the
wording with the documented path in the surrounding azure/device-code section.

---

Nitpick comments:
In `@pkg/auth/cloud/azure/setup_account_source_test.go`:
- Around line 11-16: Refactor TestAccountSourceForAuthMethod into a table-driven
test containing each auth method and expected account source, then iterate over
the cases with a subtest for each mapping. Preserve the existing three scenarios
and assertions against accountSourceForAuthMethod.

In `@pkg/auth/providers/azure/interactive_test.go`:
- Around line 194-197: Update TestDisplayBrowserPrompt to capture the UI writer
output from displayBrowserPrompt and add assertions verifying that the title and
browser status message are written correctly, rather than just checking that the
function does not panic. If the UI writer cannot be captured or the output
cannot be observed reliably, remove the test entirely as it would only provide
code coverage without testing actual behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 75605303-5518-41f5-b550-905c06bf8c1d

📥 Commits

Reviewing files that changed from the base of the PR and between a330649 and 0ad89f7.

📒 Files selected for processing (20)
  • docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md
  • docs/prd/azure-interactive-auth.md
  • pkg/auth/cloud/azure/setup.go
  • pkg/auth/cloud/azure/setup_account_source_test.go
  • pkg/auth/factory/factory.go
  • pkg/auth/factory/factory_test.go
  • pkg/auth/providers/azure/device_code.go
  • pkg/auth/providers/azure/device_code_cache.go
  • pkg/auth/providers/azure/device_code_ui.go
  • pkg/auth/providers/azure/interactive.go
  • pkg/auth/providers/azure/interactive_test.go
  • pkg/auth/types/azure_credentials.go
  • pkg/auth/types/constants.go
  • website/blog/2026-08-04-azure-interactive-auth.mdx
  • website/docs/cli/commands/auth/usage.mdx
  • website/docs/cli/configuration/auth/providers.mdx
  • website/docs/intro/multi-cloud.mdx
  • website/docs/stacks/auth.mdx
  • website/docs/tutorials/azure-authentication.mdx
  • website/src/data/roadmap.js

Comment thread docs/prd/azure-interactive-auth.md Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/auth/providers/azure/interactive_test.go (1)

102-116: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Check account_source in the device-code provider cache test.

pkg/auth/providers/azure/device_code_cache_test.go writes msal_token_cache.json, but it does not assert the persisted Account["..."]["account_source"] value for device_code or interactive providers. Add an assertion in that flow instead of relying on accessor-only coverage in interactive_test.go.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/auth/providers/azure/interactive_test.go` around lines 102 - 116, Extend
the cache persistence flow in the device-code provider cache test to inspect the
persisted MSAL token cache and assert that the relevant Account entry has
account_source set to "device_code". Keep the existing accessor assertions in
interactive_test.go unchanged, and add coverage for the persisted
interactive-provider value in the corresponding cache entry if that flow
exercises both provider types.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/auth/providers/azure/interactive_test.go`:
- Around line 206-210: Document the exported methods on promptStreams by adding
concise Go doc comments for Input, Output, Error, RawOutput, and RawError, with
each comment beginning with its method name and describing the corresponding
stream returned.

---

Outside diff comments:
In `@pkg/auth/providers/azure/interactive_test.go`:
- Around line 102-116: Extend the cache persistence flow in the device-code
provider cache test to inspect the persisted MSAL token cache and assert that
the relevant Account entry has account_source set to "device_code". Keep the
existing accessor assertions in interactive_test.go unchanged, and add coverage
for the persisted interactive-provider value in the corresponding cache entry if
that flow exercises both provider types.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 30857b35-67e7-40ba-ad84-64a7008f738f

📥 Commits

Reviewing files that changed from the base of the PR and between 2259c2a and 090a0fb.

📒 Files selected for processing (7)
  • docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md
  • docs/prd/azure-interactive-auth.md
  • pkg/auth/cloud/azure/setup_account_source_test.go
  • pkg/auth/providers/azure/interactive.go
  • pkg/auth/providers/azure/interactive_test.go
  • website/docs/cli/configuration/auth/providers.mdx
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (6)
  • website/src/data/roadmap.js
  • pkg/auth/cloud/azure/setup_account_source_test.go
  • pkg/auth/providers/azure/interactive.go
  • docs/fixes/2026-08-03-azure-cli-cache-corruption-guest-users.md
  • website/docs/cli/configuration/auth/providers.mdx
  • docs/prd/azure-interactive-auth.md

@github-actions github-actions Bot added size/l Large size PR and removed size/m Medium size PR labels Aug 4, 2026
@codecov

codecov Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.38462% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.77%. Comparing base (13bce50) to head (d8f4267).

Files with missing lines Patch % Lines
pkg/auth/providers/azure/interactive.go 87.34% 6 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2862      +/-   ##
==========================================
+ Coverage   82.75%   82.77%   +0.01%     
==========================================
  Files        1860     1861       +1     
  Lines      180337   180438     +101     
==========================================
+ Hits       149240   149350     +110     
+ Misses      23309    23299      -10     
- Partials     7788     7789       +1     
Flag Coverage Δ
unittests 82.77% <90.38%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/auth/cloud/azure/setup.go 92.65% <100.00%> (+0.08%) ⬆️
pkg/auth/factory/factory.go 93.75% <100.00%> (+0.13%) ⬆️
pkg/auth/providers/azure/device_code.go 62.00% <100.00%> (+1.17%) ⬆️
pkg/auth/providers/azure/device_code_cache.go 81.88% <100.00%> (+1.81%) ⬆️
pkg/auth/providers/azure/device_code_ui.go 26.77% <100.00%> (+3.63%) ⬆️
pkg/auth/types/azure_credentials.go 79.54% <ø> (ø)
pkg/auth/types/constants.go 100.00% <ø> (ø)
pkg/auth/providers/azure/interactive.go 87.34% <87.34%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aknysh
Andriy Knysh (aknysh) merged commit d2b8e81 into main Aug 5, 2026
83 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the aknysh/feat-azure-browser-auth branch August 5, 2026 15:43
@atmos-pro

atmos-pro Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

These changes were released in v1.225.0.

Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Sep 15, 2026
…guide

azure/interactive (browser auth-code+PKCE, added in #2862) was missing from
from-azure-config.md's provider mapping -- it's the closer match to plain
az login's default browser flow, and the one to reach for when Conditional
Access blocks device code.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Erik Osterman (Cloud Posse) (osterman) added a commit to jorrite/atmos that referenced this pull request Sep 16, 2026
…itations (cloudposse#2740)

* feat(agent-skills): add auth migration sub-skills to atmos-migration

Add seven from-* reference guides (AWS/GCP/Azure CLI config, Leapp,
Granted, saml2aws, okta-aws-cli) so agents can help users migrate
existing credential tooling into atmos auth, mirroring the existing
IaC migration references. okta-aws-cli's guide explicitly calls out
the OIDC device-flow gap tracked in docs/prd/okta-auth-identity.md
rather than fabricating a mapping.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): correct fabricated CLI commands, add shell/exec guidance

Verify every third-party CLI command cited in the auth migration guides
against upstream READMEs and live `aws`/`gcloud`/`az` help output rather
than relying on training-data recall:

- from-okta-cli.md: correct a wrong premise (there is one Okta AWS
  Federation Application type, not a separate SAML vs OIDC app split);
  document okta-aws-cli's real web/m2m/direct commands.
- from-granted.md: remove fabricated `granted sso populate` and `-a`
  flag; fix `--export` short flag (`-ex`, not `-e`); correct claim about
  which Granted commands write to ~/.aws/credentials.
- from-aws2saml.md: fix `aws_session_duration` field name, drop
  unverified `app_id` field.

Also document that Atmos does not mutate ~/.aws/config, gcloud config, or
az config by default (recommends `atmos auth shell`/`exec`), and that
`atmos auth env` redirects the standard SDK env vars to Atmos-managed
files instead -- add this plus a CLI command-equivalence table to every
guide, tailored per cloud (Azure is the one exception that also writes
into the shared ~/.azure/msal_token_cache.json for az CLI compatibility).
Also cover the aws/user browser OAuth2 PKCE fallback (no static keys
required), ECR/EKS native integrations, and aws/assume-root in
from-aws-config.md, and correct atmos auth console --isolated support for
simultaneous multi-account browser sessions in from-granted.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): drop repo-internal path citations from distributed skills

Skills are distributed as just the agent-skills/ directory (per
docs/prd/atmos-agent-skills.md — installers never get the rest of the
Atmos monorepo), so citations like `pkg/auth/providers/azure/device_code.go`,
`docs/prd/okta-auth-identity.md`, and `website/src/data/roadmap.js` are
dead references for anyone using the skill outside this repo. Replace
source-file citations with plain prose, and swap the internal roadmap
data path for the public https://atmos.tools/roadmap URL.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): drop repo-internal path citations from 7 other skills

Same distribution bug as the atmos-migration skills: only agent-skills/
ships to installed skill consumers, so citations into pkg/, cmd/,
docs/prd/, and local website/ file paths are dead references outside
this monorepo. Sweep and fix all instances across the rest of the skill
tree:

- atmos-kubernetes, atmos-helm: drop cmd/*/*.go citations for the
  "experimental" feature flag claim, keep as plain prose.
- atmos-settings: drop pkg/schema/schema.go struct citation.
- atmos-steps: replace a local website/docs path with its public
  atmos.tools/workflows/steps/type URL, drop a "go inspect pkg/runner/step"
  instruction, genericize a hardcoded example cast path.
- atmos-git, atmos-introspection: drop docs/prd/*.md citations, keep the
  claims as prose.
- atmos-ai: drop 5 examples/... directory citations, convert the
  "Related Examples" section to a "Related Patterns" prose summary.
- atmos-schemas (the bulk of this fix, 23 hits): replace
  pkg/datafetcher/schema/*.json citations with plain descriptions
  throughout (Overview, Embedded Schemas, Vendor Package Schema, the
  "Which Schema Files to Update" table, "Differences Between Schema
  Files", the Checklist, and Reference Files), and swap local
  website/docs/*.mdx paths for their real public URLs -- verified via
  frontmatter slugs and existing cross-links on the site rather than
  guessed from filenames (validate-stacks.mdx and validate-schema.mdx
  actually resolve to /cli/commands/validate/stacks and .../schema, not
  the filename-derived paths). Same fix applied to
  references/schema-structure.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): address CodeRabbit review on PR 2740

- from-azure-config.md: split the az login command-equivalence row --
  interactive/device-code maps to `atmos auth login`, but client-secret
  service principal has no direct equivalent (was incorrectly lumped
  into the same row as a working mapping).
- from-gcp-config.md: split `gcloud auth login` from
  `gcloud auth application-default login` in the command-equivalence
  table (only the latter feeds gcp/adc, and it remains a required
  external prerequisite -- atmos auth login doesn't replace it). Fix
  `gcloud auth print-access-token` mapping: atmos auth whoami displays
  identity info, not a raw bearer token, so there's no direct
  equivalent. Drop a repository-internal reference ("the codebase's
  constants file") from the gcp/oidc gotcha, keeping only the
  user-facing claim.
- SKILL.md: add okta-aws-cli to the Authentication escalation routing
  bullet so it isn't the one guide missing from that list.

Reviewed and dismissed as false positives (not fixed): an automated
"SkillSpector" scan flagging normal-length documentation as "context
window stuffing" and prose mentions of `~/.aws/credentials` as
"credential access"/"privilege escalation" -- neither reflects anything
present in a markdown reference guide. Also skipped LanguageTool's
ellipsis-character style suggestions, since the `...` in question is
inside code spans representing truncated CLI syntax, not prose.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(agent-skills): disambiguate okta-aws-cli from Okta's other CLIs

Okta ships three unrelated tools all colloquially called "Okta CLI":
okta-aws-cli (AWS credential federation, what this guide covers),
the deprecated cli.okta.com scaffolding tool, and its replacement
okta-cli-client (a general Okta Management API client for managing
users/groups/apps within an org). The latter two never touch AWS and
have no migration mapping to atmos auth -- add a table up front so an
agent confirms which tool a user means before assuming this guide
applies, or inventing a mapping that doesn't exist.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): address second CodeRabbit review round on PR 2740

- from-aws-config.md: document the actual prerequisite for automated EKS
  kubeconfig -- an aws/eks auth.integrations entry with a linked identity
  and spec.cluster.name/region is required (verified against
  pkg/auth/integrations/aws/eks.go), it isn't automatic with zero config
  as previously implied.
- from-okta-cli.md: fix a self-contradiction -- the shape table claimed
  direct password+MFA API login was "true for Classic orgs" for
  okta-aws-cli web users, but the same file already states web requires
  Okta Identity Engine and cannot run on Classic orgs at all.
- SKILL.md: add okta-aws-cli to the frontmatter description, which
  listed every other covered source but this one.

Skipped: a finding claiming cross-skill relative links (e.g.
../../atmos-auth/SKILL.md) can't resolve in a distributed skill. Verified
against docs/prd/atmos-agent-skills.md's own documented directory layout
(lines 531-554) -- every distribution path (Claude Code plugin or `atmos
vendor pull` for other tools) preserves each skill's SKILL.md +
references/ subdirectory structure; only paths outside agent-skills/
break, which is what the first review round already fixed. Also skipped
a recurring SkillSpector false positive flagging prose mentions of
credential file paths as "credential access" -- same as before, nothing
in a markdown reference guide accesses anything.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): shrink atmos-migration/SKILL.md under the 20KB CI limit

CI's "Validate agent skills structure and size" job enforces a 20480-byte
hard limit on SKILL.md (Agent Skills spec's progressive-disclosure
recommendation -- move detail to references/). The file had grown to
22968 bytes across several merges as both main and this branch kept
adding routing content (Terramate/Makefile/Justfile/Taskfile/mise/Aqua
on main's side, seven auth-migration guides on this branch's side).

Trim without losing any routing information:
- Remove the "Additional Resources" section entirely -- every reference
  file it described was already linked, with its routing condition, from
  the "Decide the Migration Shape First" and "Migrating Authentication"
  tables above it. Restating each file a second time was pure
  duplication once the file had 17 reference entries.
- Tighten "Common Problems in Task-Runner Migration" -- each bullet
  already states plainly that it's a short summary of detail that lives
  in each reference file's own "Common Problems" section, so the
  SKILL.md-level copy didn't need to restate every clause.
- Shorten the Anti-Patterns Makefile/Justfile/Taskfile bullet, which
  re-explained concurrency/ordering already covered by Core Principle 7
  and the Common Problems section just above it.

18881 bytes / 282 lines afterward -- comfortably under both the 500-line
and 20480-byte limits, verified by replicating the CI script's exact
wc -l/wc -c checks locally.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): address third CodeRabbit review round on PR 2740

- atmos-ai/SKILL.md: document that Gemini CLI stopped serving personal
  Google-account ("Login with Google") users on 2026-06-18 in favor of
  Antigravity CLI -- verified directly against Gemini CLI's own docs
  banner, not just CodeRabbit's narrower "qualify Gemini MCP support"
  framing. Also flag the example MCP server config's unpinned `@latest`
  packages as non-production and point back to the existing Guardrails
  advice on pinning.
- from-gcp-config.md: note the iam.allowServiceAccountCredentialLifetimeExtension
  org-policy requirement for gcp/service-account lifetimes above 3600s
  (verified via Google's own IAM docs) -- without it, token generation
  fails.
- from-granted.md: wrap the `atmos auth env` mapping in eval() and note
  it needs --login or a prior `atmos auth login`, matching the pattern
  from-leapp.md's equivalent row already used correctly.
- from-okta-cli.md: fix imprecise phrasing that could be misread as "only
  one Okta object is involved" -- okta-aws-cli web genuinely pairs two
  Okta objects (an OIDC Native App for login, the SAML AWS Federation App
  for credentials); the accurate claim is narrower: the Federation App
  itself has no OIDC-flavored variant, not that only one object exists.

Skipped (verified stale/invalid): CodeRabbit repeated its earlier
"remove repository-relative links" finding on the auth migration guides.
Already verified wrong in an earlier round against
docs/prd/atmos-agent-skills.md's documented distribution layout, which
preserves every skill's SKILL.md + references/ structure in every
distribution path -- re-confirmed no change to that layout since. Also
skipped from-leapp.md's half of the eval() finding: it already used the
correct `eval $(atmos auth env ...)` form. Dismissed SkillSpector's
AS1/AS2/PE3 findings on atmos-ai/SKILL.md as false positives (documenting
atmos mcp export's own per-CLI config paths and confirming the exported
file contains no secrets is the opposite of credential snooping) and the
LanguageTool typographic-quote nit as a non-issue.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(ci): allowlist gocloud.dev for govulncheck and CodeQL Go analysis

govulncheck failed with a DNS/network error, not a real vulnerability
finding: "dial tcp: lookup gocloud.dev on 127.0.0.53:53 ... operation
not permitted", followed by "could not import gocloud.dev/blob (invalid
package name)". gomplate (via go-fsimpl's blobfs) transitively imports
gocloud.dev/blob and its gcsblob/s3blob/azureblob/gcerrors/gcp
subpackages -- Google's real, official Go Cloud Development Kit. Go's
vanity-import-path discovery hits `https://gocloud.dev/?go-get=1`
directly to resolve the redirect, bypassing GOPROXY, and harden-runner's
block-mode egress policy for this job didn't have gocloud.dev on its
allowed-endpoints list.

Add gocloud.dev:443 to both the govulncheck job (which reported the
failure) and the CodeQL `analyze` job's go-language leg (which runs the
same whole-module-graph autobuild over the identical dependency tree and
would hit the same block on its next run). semgrep runs entirely inside
a Docker container with no Go build step, so it's unaffected and left
alone.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(agent-skills): use public doc URLs in migration references, fix leapp env caveat

Repo-relative links to ../../atmos-auth/SKILL.md and its
providers-and-identities.md reference break once atmos-migration ships as a
standalone skill package. Replace them with the equivalent public
atmos.tools/cli/configuration/auth pages. Also add the missing "env alone
doesn't authenticate" caveat to from-leapp.md's Generate Credentials row,
matching from-granted.md's existing, already-correct wording.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(security): bump website deps for 5 Dependabot alerts (js-yaml, svgo, joi, colord)

Bumps js-yaml, svgo, joi, and colord pnpm overrides to their patched
versions (GHSA-2883-xcg3-v3hh, GHSA-w27v-7q3p-w38r, GHSA-4vpr-x523-8j87,
GHSA-6w3j-5fw6-r9vr, GHSA-gg4h-3hg2-grpc). All within the same major
version, so none are blocked by dependabot.yml's major-bump ignore rule.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(agent-skills): add azure/interactive to the az-config migration guide

azure/interactive (browser auth-code+PKCE, added in cloudposse#2862) was missing from
from-azure-config.md's provider mapping -- it's the closer match to plain
az login's default browser flow, and the one to reach for when Conditional
Access blocks device code.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(emulator): give floci/gcp and floci/az a longer health check start_period

atmos emulator up gcp/azure flipped to "unhealthy" twice in a row in CI
(TestScaffoldGCPLandingZoneFlociE2E, TestScaffoldAzureLandingZoneFlociE2E),
both times ~54-56s in, right after the heavy AWS scaffold tests loaded up
the Docker daemon. The shared 10s start_period + 5*10s retries gives only
a 60s budget before Docker's own health check reports the terminal
"unhealthy" state, which pkg/container.WaitHealthy correctly fails fast on
by design. floci/gcp (Quarkus JVM warmup) and floci/az (TLS cert
generation on first boot) are already known to be slower to start than
floci/aws -- see docs/fixes/2026-08-31-floci-azure-health-check-race.md,
which fixed the same symptom at a different readiness gate. Give them
40s instead, bringing their total budget to ~90s to match.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(emulator): floci-gcp/floci-az health check probed with curl, which the images no longer ship

The previous commit's fix (bumping floci/gcp and floci/az's health check
start_period to 40s) was based on a wrong diagnosis. Reproducing locally
showed the real cause: floci-gcp and floci-az are GraalVM native-image
builds with no HTTP client binary at all. Every health check probe failed
with "curl: command not found" -- a permanent condition, not a slow-start
race, so no start_period bump could have fixed it (confirmed: the bumped
budget just delayed the same failure from ~54s to ~84s in the next CI run).

Switch the probe to a pure bash `/dev/tcp` TCP-connect test, which needs
only bash (present in all three Floci images) and no external HTTP client.
Reverts the now-unjustified start_period split back to the original
uniform 10s default, since these images actually start in ~0.02s.

Verified locally: reproduced the "curl: command not found" failure via
docker inspect on the unhealthy container, then confirmed the fix by
bringing up both `atmos emulator up gcp -s dev` and
`atmos emulator up azure -s dev` against scaffolded projects.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(agent-skills): fix CodeRabbit-flagged inaccuracies in Granted/Okta migration guides

- from-granted.md: bare `assume <profile>` exports into Granted's current
  shell (per the doc's own prose two lines down), not a subshell -- the
  mapping to `atmos auth shell` contradicted that. Merge the two Granted
  "export" variants into one row mapping to `eval $(atmos auth env -i
  <identity> --login)`, and demote `atmos auth shell` to a labeled
  Atmos-only subshell alternative with no Granted equivalent.
- from-okta-cli.md: `atmos auth list` lists atmos.yaml-configured
  identities, not okta-aws-cli's locally cached profile names -- mark as
  no direct equivalent instead of a 1:1 mapping. Also correct the OIDC
  Native Application's role: it's not device-authorization-only --
  okta-aws-cli web needs Authorization Code, Device Authorization, and
  Token Exchange grants, plus AWS Federation app discovery via
  okta.users.read.self.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>

This branch was successfully deployed

1 active deployment
preview — d8f4267b Deployed Aug 5, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants