ConsoleMe
GitHub
  • About
  • Architecture
  • Features
    • Credentials
      • AWS Console Login
      • AWS Credential Broker
    • Policy Management
      • Policies View
      • Policy Editor for IAM, SQS, SNS, and S3
      • Self-Service IAM Wizard
      • Policy Request - Review Page
      • Role Creation and Cloning
  • Demo
  • Quick Start
    • Docker
    • Local
  • Prerequisites
    • Required IAM Permissions
      • Central Account
      • Spoke Accounts
  • Configuration
    • Web App Authentication and Authorization
      • Local Development (Auth bypass)
      • ALB Auth (Recommended)
      • Retrieving Google Groups
      • OIDC/OAuth2
        • Cognito
        • Okta
      • SAML
      • Plain-Text Headers
    • Role Credential Authorization
      • Role Tags
        • Role Tagging Service Control Policy (Recommended)
      • Role Authorization through Dynamic Configuration
      • Custom Authorization (Internal Plugin)
    • Account Syncing
    • Metrics
    • Dynamic Configuration
    • AWS Resource Syncing
    • CLI Authentication
    • Sending email through SES
    • AWS Secret Manager Integration
    • CloudTrail Integration via AWS Event Bridge
    • Slack Notifications
  • Celery Tasks
    • Celery Flower
  • Development Guide
    • UI Components
    • Managing Dependencies
  • Deployment Strategies
  • Contributing
  • FAQ
  • License
  • Security
  • Weep CLI
    • Getting Started with Weep
    • AWS Credentials in the CLI using Weep and ConsoleMe
    • Configuration
    • Commands
      • List
      • Serve
      • Export
      • File
      • Credential Process
    • Assuming Roles
    • Advanced Configuration
      • Routing for Metadata Service
      • Shell Completion
Powered by GitBook
On this page
  • Challenge Generator
  • Challenge Poller
  • Challenge Validator

Was this helpful?

  1. Configuration

CLI Authentication

PreviousAWS Resource SyncingNextSending email through SES

Last updated 3 years ago

Was this helpful?

ConsoleMe's CLI () authenticates to the ConsoleMe backend through one of two methods: Mutual TLS (This is currently not supported in the open source code), or standalone challenge authentication response.

The challenge authentication flow is as follows:

  1. Client sends a GET request to ConsoleMe's unauthenticated challenge endpoint. The server generates and stores a temporary token for the authentication request. A token is scoped to the username sent in the request and expires after a couple of minutes. ConsoleMe tells the client where the user should authenticate it in their browser (challenge_url), and where to poll (polling_url).

  2. Client starts polling the unauthenticated polling_url every couple of seconds until the token expires after a couple of minutes.

  3. The user is redirected to the Challenge Validator endpoint, which will authenticate them. After they've been successfully authenticated, the ConsoleMe backend will mark the user's request as successful in its cache.

  4. After the user has authenticated, the client (which is polling the challenge_poller endpoint every couple of seconds) should receive a success status with the super secret encoded JWT that it can use to authenticate the user for credential requests to ConsoleMe.

Challenge Generator

GET https://consoleme.example.com/noauth/v1/challenge:generator/:userName

Client requests a challenge URL to authenticate a user.

Path Parameters

Name
Type
Description

string

{
  "challenge_url": "https://consoleme.example.com/challenge_validator/f82e6492-36a3-477d-9dab-98df1a0753a3",
  "polling_url": "https://consoleme.example.com/noauth/v1/challenge_poller/f82e6492-36a3-477d-9dab-98df1a0753a3"
}

Challenge Poller

GET https://consoleme.example.com/noauth/v1/challenge:poller/:challengeToken

Endpoint that the CLI polls every few seconds to determine if the user has successfully authenticated. While the challenge is pending, status is the only attribute returned in the response. Once the user has successfully authenticated to the Challenge Validator endpoint, status will be updated, and the rest of the attributes will be returned in the next response.

Path Parameters

Name
Type
Description

string

{
    "status": "pending|success",
    "cookie_name": "consoleme_auth",
    "expiration": 1604524944,
    "encoded_jwt": "eyJ0eXAi....",
    "user": "user@example.com"
}

Challenge Validator

GET https://consoleme.example.com/challenge:validator/:challengeToken

Endpoint that user visits in their browser to authenticate to ConsoleMe through SSO.

Path Parameters

Name
Type
Description

string

You've successfully authenticated to ConsoleMe and may now close this page.
Weep