Generic ARPA2 commandline shell support -- shell switching -- JSON/AMQP backend
Project description
The ARPA2 Shell Collection
ARPA2 Shells are the control programs for hosts that implement parts of the InternetWide Architecture. They may integrate with components like LDAP, Kerberos or databases to setup and control those components. The shells have an interactive interface and a JSON access path.
To operate a node in your infrastructure, you might use the basic commands relating to the various programs that make them do what they are supposed to do. Or you might use a wrapper shell that is designed to make functionality available at a conceptual level. This is the intention of the ARPA2 Shells.
As part of doing something, an infrastructural node may need to order co-operation from another node. This too can be done using traditional techniques, for instance accessing a shell and sending a command. then scraping the output. This tends to be tedious and errorprone. The ARPA2 Shells facilitate a JSON access channel to accommodate such commands in an automation-friendly manner, and indeed the shells can calll on each other.
Access Control
A vital part in the design of the ARPA2 Shell system is that they exercise access control not on the sessions, but on the individual commands. This is a bit like file access permissions, but now applied to operations. Here it helps that the operations aim to be conceptual, rather than mechanical. Instead of granting the permission to write a file, you would be granting the permission to add and remove users under a domain.
An interesting result of this detailed level of access control is that we can open the system to anyone. The shells and their JSON interfaces are open to any user anywhere, both internal and external, but before they can succeed in running a certain command they need to be qualified to run just that command. In other words, anyone accessing our shells can get a prompt -- but they may still be impotent when it comes to issuing commands. This openness is of importance with our intended pluggable infrastructure, where third parties can plugin service under our domain and we allow them a limited degree of control.
Command Syntax implies JSON Scheme
The commands issued have a clear syntax, of which the ARPA2 Shells
are aware. This is inherited from the cmdparser.cmdparser
package
by Andy Pearce. We extended this package with a JSON interface,
using the same grammar to form a JSON scheme. We are still hoping
to integrate our work into the original package, but have ceased
waiting and instead forked the package. You can use our package
arpa2shell.cmdparser
as a drop-in replacement for the original
cmdparser.cmdparser
package in its 1.0.1 version.
Read more:
Generic Modules
The class arpa2shell.Cmd
is a generic class from which the
ARPA2 Shells all inherit. It provides them with a few general
facilities by which their behaviour is more general. We may
also add a few other general things in the arpa2shell
module,
such as LDAP access, or sending JSON commands to that interface
of other ARPA2 Shells.
Shells install as entry points into the arpa2shell
or other
packages, and the generic shell installs as an arpa2shell
command. This command might be started as a shell anywhere,
but will most commonly be used to service an OpenSSH login
or other (remote) console access attempts.
The arpa2shell
does not process commands on its own, but it
can launch other shells. This allows switching back and forth
between command environments that setup different aspects of
the infrastructure. It is also possible to prefix a command
for a subshell with that subshell's name. The result is that
ARPA2 Shells can focus on one aspect alone, while operators
still have control over as many of these aspects as they need
on any particular node.
Choosing GSS-API and AMQP 1.0
ARPA2 Shells can send commands to subshells, but they should not do this directly. Instead, they should rely on a switching backbone that grants optimum flexibility to the operator and domain owners. This is established by messaging through AMQP 1.0, where access control is achieved through GSS-API with credential forwarding.
We use GSS-API as an end-to-end encryption/authentication layer, not TLS. This might sound obnoxious, but it is grown out of a true need. TLS does not protect end-to-end traffic, but instead a single client-server connection. Since we intend to allow any user to access any shell, we need to account for deep linking into our infrastructure. Again, the objective is to support external components diving into whatever parts of the infrastructure and simply control their usage of conceptual commands.
The choice to transport over AMQP 1.0 is for the same reason; having end-to-end protection, we can now allow for flexible routing of messages between infrastructural nodes, at least for the passing of JSON messages. This is best done with a flexible infrastructure. It is true that AMQP 1.0 is more complex than its predecessors, but the upgrade to 1.0 enables the routing of messages between domains, and that is in the interest of externally provided services being plugged into our infrastructure.
Read more:
Multiple Shells in one Setup
Operators may install multiple shells on one machine, and
to simplify that we support multiple shells in one Git repository.
This is not required, other repositories can add their own shells
under the arpa2shell
name space.
The setup.py
builds and distributes multiple software
packages at once. You normally want to install the ones that
make sense locally, so keep an eye on that. We may split up
the setup.py
later if that makes sense.
The currently supported shells are:
- The meta-shell
arpa2shell
- The basic client
arpa2api
for JSON / GSS-API / AMQP 1.0 - The basic server
arpa2api.d
for JSON / GSS-API / AMQP 1.0 - arpa2dns for DNS management
- arpa2id for Identity management
- arpa2reservoir for DNS management
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file arpa2.shell-0.1.0.tar.gz
.
File metadata
- Download URL: arpa2.shell-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdf0a0bfee94f7a47c2f7a88b003fbee8eef6bbece0967f82b0eb8d5028706f4 |
|
MD5 | cc4bc49ee314fe6d7117033c9d76853f |
|
BLAKE2b-256 | 8b20d43c17d544f7240e3a0d7cd1dd6e047a72e09de5ec5f6a2188d133caa0af |
File details
Details for the file arpa2.shell-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: arpa2.shell-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30e46bdfabfadf8065019056ebbed5581480873513c8bd82f5433dadfb4e660a |
|
MD5 | cb4769a726c91e453173f88c2c210323 |
|
BLAKE2b-256 | 578a65d818dd6725886e4e497f1783c2b4fe5624e1a864b2dd1b023955fa9be1 |