Skip to main content
Travis build status image Coverage status Version

About

This is the command line interface to the *c-bastion* jump host. It allows you to upload and ssh-key-file and create a user on the jump-host, so that you can log into it. It requires an initial connection to auth-server to obtain an (open-id-connect) access token.

The basic flow is as follows:

+-----------+   +-----------+   +-----------+
|           |   |           |   |           |
| developer |   |   auth    |   |   jump    |
|           |   |           |   |           |
+-----------+   +-----------+   +-----------+
      |               |               |
      |               |               |
      +--------------->               |
      | request token |               |
      |               |               |
      <---------------+               |
      | receive token |               |
      |               |               |
      +------------------------------->
      | upload ssh-key|and create user|
      |               |               |
      |               |               |
      +------------------------------->
      | ssh login     |               |
      |               |               |
      |               |               |
      +               +               +

Where developer is your local machine (desktop, laptop, etc..) auth is the auth-server and jump is the jump host. cbas takes care of obtaining the token and uploading the ssh-key.

Install

Use the Python standards, for example:

$ pip install cbas

Usage

$ cbas --help
Usage: cbas [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose                   Activate verbose mode.
  -c, --config <config_path>      Path to config file. Default: '~/.cbas'.
  -u, --username <username>       Username. Default: the logged in user.
  -k, --ssh-key-file <key-file>   SSH Identity to use. Default:
                                  '~/.ssh/id_rsa.pub'.
  -p, --password-provider <provider>
                                  Password provider. Default: 'prompt'.
  -a, --auth-url <auth_url>       Auth-server URL.
  -s, --client-secret <secret>    Special client secret, ask mum.
  -h, --jump-host <host>          Jump host to connect with.
  --version                       Print version and exit.
  --help                          Show this message and exit.

Commands:
  delete  Delete user.
  upload  Upload ssh-key and create user
verbose

This switch activates verbose output, useful in case you are debugging

config

The path to the config file. Note, since we are using the yamlreader package, this could also be a directory with multiple config files. Also, the config is in YAML syntax, see below.

username

The username when communicating with the auth-server. Note that the returned token contains the authenticated username which is subsequently sent to the jump-host. Thus you will not be able to create arbitrary users on the jump-host

ssh-key-file

Path to the public ssh-key-file. This will be uploaded to the jump-host.

password-provider

Where to get the password from. Valid values are prompt and keyring (and testing). prompt will always ask for a password, whereas keyring will ask exactly once and then store the password in the system keyring.

auth-url

The URL to access the auth-server and obtain the token. E.g. https://auth-server.example/oauth/token. (Note that this includes the protocol.

client-secret

A special client secret string needed when communicating with the auth-server.

jump-host

The hostname of the jump-host. E.g. jump-host.example. (Note that this excludes the protocol.)

version

Display verion number and exit.

help

Display help and exit.

License

Copyright 2016 Immobilien Scout GmbH

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release files for cbas 112

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cbas 112
File Size Uploaded
cbas-112.tar.gz 6.2 kB Details

Release files / cbas-112.tar.gz

Download URL cbas-112.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e40d1f0e7d7ac6f83a6ce8dc142de15801b92f86c13c6a6761dba6475465eca
BLAKE2b-256 checksum
How to use checksums
a13d24a683b00f0c2eb6efd15627af80cf85ab17d8957ae20e6b807da9ce352d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

156

1 release file

154

1 release file

150

1 release file

142

1 release file

136

1 release file

133

1 release file

131

1 release file

130

1 release file

128

1 release file

127

1 release file

125

1 release file

120

1 release file

119

1 release file

118

1 release file

117

1 release file

116

1 release file

115

1 release file

113

1 release file

This release

112 This release

1 release file

109

1 release file

108

1 release file

106

1 release file

100

1 release file

97

1 release file

96

1 release file

95

1 release file

94

1 release file

92

1 release file

88

1 release file

86

1 release file

85

1 release file

82

1 release file

81

1 release file

80

1 release file

79

1 release file

77

1 release file

1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page