Perl6 bindings for Munge, the MUNGE Uid 'N' Gid Emporium Authentication Service
From the main Munge wiki:
MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating and validating credentials. It is designed to be highly scalable for use in an HPC cluster environment. It allows a process to authenticate the UID and GID of another local or remote process within a group of hosts having common users and groups. These hosts form a security realm that is defined by a shared cryptographic key. Clients within this security realm can create and validate credentials without the use of root privileges, reserved ports, or platform-specific methods.
Only tested with Linux, (Should easily port to Windows if anyone wants to do that, patches welcome!)
Follow the libmunge installation instruction.
For Ubuntu, it may be as simple as
sudo apt-get install libmunge-dev
See man pages for detailed usage, but this is the simple case:
use Munge; my $encoded = Munge.new.encode('optional payload'); say $encoded;
use Munge; my $encoded = ... my $payload = Munge.new.decode($encoded);
Any errors are thrown as exceptions.
Simple versions of
unmunge are in the
depicting more complicated usage, but don't use them, they are just
$ ./munge.p6 --help Usage: ./munge.p6 [--cipher=<Str>] [--MAC=<Str>] [--zip=<Str>] [--ttl=<Int>] [--socket=<Str>] [--uid-restriction=<Int>] [--gid-restriction=<Int>]
echo hi | ./munge.p6 | ./unmunge.p6
Copyright © 2018 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.