Skip to content

Consider using CF_USERNAME/CF_PASSWORD environment variables instead of positional args for cf auth #6

@mheadd

Description

@mheadd

Description

Following up on PR #4 (Focus auth on non-interactive usage), the authentication instructions currently show:

cf auth <USERNAME> <PASSWORD>

For CI/CD and agent-driven workflows, it may be safer to recommend using the CF_USERNAME and CF_PASSWORD environment variables instead:

export CF_USERNAME=<USERNAME>
export CF_PASSWORD=<PASSWORD>
cf auth

Rationale

  • Avoids credentials in shell history — positional args are recorded in .bash_history and may appear in process listings
  • Aligns with 12-factor principles — configuration via environment variables
  • Standard CF CLI pattern — the CLI natively supports these env vars

References

cc @mogul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions