swat

command module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: BSD-3-Clause Imports: 16 Imported by: 0

README

SWAT

Swift Auth Token Tool

About

A quick tool to help with getting swift OS_AUTH_TOKEN. Our environment is one that uses SwiftStack and Active Directory based authentication using standard user accounts. It is not prudent then to leave OS_PASSWORD or ST_KEY values sitting around.

Usage

Basic usage is to call swat login, enter the password, then sh style environment variable setting strings will be returned for OS_AUTH_TOKEN and OS_STORAGE_URL. By default these will also be saved to a dot file that can be sourced in future shells while the token is still valid

Tenants

swat tenants can be used to list possible additional accounts/tenant ids to which you have access. This is specially designed for our use case of having a primary Active Directory group for the account with a semi standard naming scheme with an additional group of readers given RO access via an ACL

Eval

The best way to really use eval via a shell function to automatically set the enviroment in the calling shell

login (){
  eval $(swat --auth-url https://some.swift.endpoint/auth/v2.0/tokens login $*)
}

Installation

go install github.com/glennsb/swat

License

3-Clause BSD

Documentation

Overview

SWAT - Swift Auth Token A wrapper to getting swift auth token Copyright (c) 2016 Stuart Glenn All rights reserved Use of this source code is goverened by a BSD 3-clause license, see included LICENSE file for details

Jump to

Keyboard shortcuts

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