Organisations should prefer profiles when operators need to switch safely between multiple accounts, organizations, or execution contexts such as a developer laptop and a CI/CD pipeline. Profiles reduce mistakes by separating credentials and settings, and they make it easier to work across environments without rewriting commands. This is especially useful when managing distributed platform infrastructure.
When profiles are the safer choice for CLI infrastructure work
Profiles are the right default when a command-line workflow needs more than one trusted context, because the same tool may be used by different operators, different accounts, or different delivery stages. That separation matters in infrastructure management because the main failure mode is not syntax, but context drift: one person targets the wrong tenant, one pipeline inherits a human profile, or one long-lived session is reused beyond its intended scope. In practice, many teams only notice that separation was missing after a change lands in the wrong environment or an automated job inherits broader access than intended.
For this reason, profiles are less about convenience than about reducing ambiguity. They help operators keep account selection, region, role, and environment-specific settings distinct without rewriting commands each time. That makes them especially useful in distributed platform operations, where the same tooling must behave predictably across laptops, build agents, and administrative workstations.
For a broader control view, NHI Management Group recommends aligning the workflow to NIST Cybersecurity Framework 2.0 so identity context, configuration discipline, and operational governance are treated as part of the same risk surface.
How profiles change the operating model
A profile is a named bundle of settings that lets a CLI resolve the right identity and execution context without forcing the operator to manually rebuild those choices on every command. In practice, that means the tool can keep separate values for credentials, default account, region, output format, or role assumption parameters while the command itself remains stable. The benefit is not just cleaner commands. It is also a narrower blast radius when someone works across multiple tenants, subscriptions, or environments.
Profiles are most effective when the organisation treats them as a control boundary rather than a convenience feature. A developer profile and a production profile should not only point to different accounts; they should also carry different expectations about privilege, session duration, and approval path. That distinction becomes important in CI/CD because the pipeline context should be explicit and reproducible, not borrowed from a human workstation. When profiles are used well, they help prevent accidental cross-environment actions and make command intent easier to audit.
- Use profiles when a single operator must switch between identities or environments during the same working session.
- Use profiles when automation needs a stable, named execution context that is separate from human login state.
- Use profiles when the risk of targeting the wrong account is higher than the small overhead of maintaining named contexts.
- Prefer separate profiles for production and non-production so elevated settings are not blended into everyday use.
That model breaks down when teams treat profiles as a substitute for access design, because naming contexts does not fix overly broad permissions, weak session governance, or poor separation between interactive and automated use.
Where profiles help, and where they can still mislead
Tighter context separation often improves safety, but it also adds configuration overhead, so organisations need to balance clarity against maintenance burden. Profiles work best when the underlying account model is already sensible. If a team has too many shared credentials, too much standing privilege, or unclear ownership of environments, profiles can hide the disorder rather than solve it.
One important edge case is the difference between interactive administration and unattended automation. A human operator may safely use profiles to move between staging and production, while a pipeline should usually rely on a dedicated non-human execution identity with tightly scoped access. Another edge case is role chaining or temporary elevation, where a profile may point to a starting identity but not fully describe the eventual privilege path. In that situation, the profile is only part of the control story. The organisation still needs to know who can assume what, from where, and for how long.
Profiles are also not a complete answer when multiple teams share the same toolchain but need different governance rules. In those cases, the operational question is not just how to switch contexts, but how to prevent a privileged context from becoming the default habit. That is where standardisation, access review, and environment-specific guardrails matter as much as the profile itself.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 6 — Access Control Management | Profiles separate account contexts and reduce cross-environment access mistakes. |
| Recommendation — Use Control 6 to separate and review CLI access paths by environment and role. | ||
| NIST CSF 2.0 | PR.AA — Identity Management, Authentication, and Access Control | Profiles are a context-control mechanism for identities and permissions. |
| PR.PS — Platform Security | CLI profiles shape safe administrative execution across workstations and pipelines. | |
| GV.RM — Risk Management Strategy | Profile choice is a governance decision about reducing wrong-target and privilege risk. | |
| Recommendation — Apply PR.AA to keep CLI identities, roles, and scopes explicitly separated. Use PR.PS to standardise secure CLI execution contexts across users and automation. Use GV.RM to define when profiles are mandatory for sensitive infrastructure changes. | ||
| OWASP Non-Human Identity Top 10 | NHI-01 — Inventory and Ownership | Profiles often represent distinct non-human or delegated execution contexts. |
| Recommendation — Inventory each profile and assign clear ownership for its access scope and lifecycle. | ||
Practitioner Guidance
What to prioritise: treat profile design as a separation-of-duties problem, not a user preference problem. The first question is whether each profile cleanly represents one trust context, one account scope, and one operating mode.
What to verify: confirm that production profiles cannot be confused with non-production defaults, and that automation does not silently inherit a human operator’s local settings. If a pipeline depends on a developer machine profile, that is a design defect rather than a convenience.
Common mistake: teams often standardise the profile names but leave the permissions, session rules, and ownership model unchanged. That creates an appearance of control without materially reducing the chance of misuse.
Practitioner takeaway: profiles are most valuable when they make the correct context obvious and the wrong context harder to reach; if they are only being used to simplify commands, the organisation has not yet used them as a control.
Related resources from NHI Mgmt Group
- What do organisations get wrong about questionnaire-based vendor risk management?
- When should organisations replace shared infrastructure access with role-based session controls?
- Should organisations prefer agentless CWPP or sensor-based monitoring?
- When should organisations prefer policy-based access control over RBAC or ABAC?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org