6 Commits

Author SHA1 Message Date
mprahl
4bcdfefcfa Make the code formatting in mbs-cli consistent with the rest of the codebase 2019-04-26 08:14:11 -04:00
mprahl
7cbba8e780 Rearrange the imports in mbs-cli 2019-04-25 13:03:18 -04:00
mprahl
4715d6aac2 Fix flake8 errors in mbs-cli 2019-04-25 13:03:18 -04:00
mprahl
82d8016670 Only import the auth library that gets used in mbs-cli
This is done so that unused libraries aren't required dependencies.
2019-04-25 13:03:18 -04:00
Jan Kaluza
c5a9a1b8af Allow auth.get_user() method to be called multiple times.
The `ImportModuleAPI` calls the `auth.get_user()` which auths the
user using Kerberos. the `ImportModuleAPI` later calls `SCMHandler`
which in its `__init__` method calls the `auth.get_user()` again.
This leads to traceback in GSSAPI, because the user is already
authed.

This commit fixes this by caching the auth results in `flask.g`,
which is reset after each request based on the Note in
http://flask.pocoo.org/docs/1.0/appcontext/#storing-data.

This commit also marks mutual auth as OPTIONAL in `mbs-cli`,
because MBS server currently does not do mutual auth.
2019-03-07 09:37:14 +01:00
Jan Kaluza
d5d64f8a8a Add simple mbs-cli client tool.
The goal of this client is to allow simple access to endpoints we use
to manage MBS - like "import" module or "retire" module.

It is not intended to contain tasks available in pyrpkg.

So far only "import" module is implemented, because that's the only
command we have REST API for.
2019-03-01 12:34:03 +01:00