cli

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cli implements a way to log into vault for CLIs

Copyright 2023 Outreach Corporation. All Rights Reserved.

Description: Defines logger singleton.

Copyright 2023 Outreach Corporation. All Rights Reserved.

Description: Stores functions to ensure that the user is logged into vault

Index

Constants

View Source
const (
	// ProductionAddress is the vault address for the producton Vault server
	ProductionAddress = "https://vault.outreach.cloud"

	// DevelopmentAddress is the Vault address for the development Vault server
	DevelopmentAddress = "https://vault-dev.outreach.cloud/"

	// OidcAuthMethod for using the oidc authentication method to obtain a Vault token
	OidcAuthMethod = "oidc"
)

const defines constants for the Vault CLI

Variables

This section is empty.

Functions

func EnsureLoggedIn

func EnsureLoggedIn(ctx context.Context, vaultAddress, authMethod string, minTimeRemaining time.Duration) ([]byte, time.Time, error)

EnsureLoggedIn ensures that we are authenticated with Vault and have a valid token, returning the token and expiration date.

func IsLoggedIn added in v1.11.0

func IsLoggedIn(ctx context.Context, vaultAddress string) ([]byte, time.Time, error)

IsLoggedIn returns a valid token and expiration time if it is not expired

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL