Giter Site home page Giter Site logo

mccli's Introduction

mccli

This is an SSH client wrapper that enables SSH with OIDC access tokens.

For server-side software, see motley_cue.

Compatibility

mccli works with Python 3 (>=3.7), and only Linux. Windows support is planned as plugins for popular SSH clients, such as PuTTY.

Documentation

The documentation is available at readthedocs.

Test server

You can test this tool against our test SSH server that supports OIDC-based authentication:

ssh-oidc-demo.data.kit.edu

The server accepts tokens from the following OIDC providers:

License

The source code is licensed under the MIT license.

The logo is licensed under the Creative Commons Attribution 4.0 International License .

mccli's People

Contributors

dianagudu avatar giffels avatar

Stargazers

 avatar Zachary Newell avatar Leonard Marschke avatar  avatar Cayoglu avatar M. avatar

Watchers

Oliver Freyermuth avatar James Cloos avatar  avatar M. avatar

Forkers

giffels

mccli's Issues

Check if `sshpass` is available

Withouth sshpass installed I get this error:

Usage: mccli [OPTIONS] COMMAND [ARGS]...

Error: No such command 'ssh-oidc-demo.data.kit.edu'.

Which makes sense, if you know the cause :)

Maybe adding a short "Prerequisites" section to installation.rst:

Prerequisites:
=============
Required dependencies:
- `sshpass`: This package is available on most linux distributions as `sshpass`
- `oidc-agent`: This package is available on most linux distributions as `oidc-agent` (use `oidc-agent-cli` on systems without GUI)
     

More info when no AT provided and multiple OPs supported on server

When no AT source is specified, mccli tries to get the list of supported OPs from motley_cue and, if only one is supported, tries using that to get an AT from the oidc-agent.

When multiple OPs are supported, make the error message more informative by printing the list of supported OPs.

Nice to have `mccli info`

mccli info <token> or `mccli info
could display output just like flaat-userinfo (because then people don't need to install flaat).

But this is really just nice to have.

urllib3 v2.0 support

From requests v2.3, support for urllib3 v2.0 was added, which breaks mccli on systems with OpenSSL older than 1.1.1 (e.g. CentOS 7).

Fix: use older urllib3 on those systems:

pip install  --force-reinstall -v "urllib3==1.26.15"

Wrong host name gives misleading error message

When using a wrong hostname, the error message is:

error: Could not infer motley_cue endpoint from command. Please specify motley_cue endpoint via --mc-endpoint.

It would make sense to first check two things and report them first:

  • does the hostname resolve to an IP address?
  • does the resolved IP address listen on the specified port?

port 443 vs 8080

mccli should first try 443. If that is not available, (e.g. because the server didn't install a certificate yet) it should

  • try 8080
  • issue a warning that encryption is not working yet
  • ask the user to continue
  • continue using 8080

mccli: Be more informative

Inform the user in cases such as:

  • assurance was not sufficient
  • token expired
  • ...

And give recommendations on commands to run (expired token => use oidc-agent interface directly, ...)

AT larger than 1024B

check if the incoming AT is longer than 1023 (or 1024?) and issue an error about it

pip upgrade from <=0.2.9 to >=0.3.0 deletes the mccli binary

This is a consequence of renaming mc_ssh to mccli, which was done in 3 steps:

  • git repository rename
  • new pypi project mccli with version 0.3.0
  • new release for mc_ssh on pypi (0.3.0) that makes the project inactive, contains only info on renaming, and pulls new mccli as dependency.

The problem is that both mc_ssh (<0.3.0) and mccli contain the binary mccli. Upgrading mc_ssh to 0.3.0 first:

  • installs mccli dependency, then
  • removes the old mc_ssh version (0.2.9, inclduing the mccli binary), and then
  • installs the new mc_ssh (0.3.0, without the mccli binary)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.