Skip to main content

Module access

Module access 

Source
Expand description

Identity and grant levels as the SSH front end names them (the ACL model).

§There is nothing defined here any more, and that is the point

This module used to carry its own KeyFingerprint, Principal, PrincipalKind and Access: a second definition of identity, sitting beside gunnar-core’s, written at the same time. One implementation forbids exactly that, and the KeyFingerprint copy was the dangerous one: it was the value the auth decision is keyed on, so two spellings of it meant the SSH layer could compute a fingerprint the identity table would never match.

Everything here is now a re-export of the one definition in gunnar-core. The module survives as a name (gunnar_ssh::access::Access reads better at a call site than gunnar_core::Level does inside an SSH dispatch), but there is no second type behind it.

§Fingerprinting a key that arrived through russh

fingerprint_of_key is the only function this module still contains, and it is four lines. It exists because russh hands over an ssh-key 0.7.0-rc.10 PublicKey and gunnar-core links ssh-key 0.6.7 The key itself cannot cross, but its wire blob can. The blob goes to gunnar_core::fingerprint_of_blob, which is where the definition lives and where the known-answer tests against real ssh-keygen -lf output are.

Functions§

fingerprint_of_key
Fingerprint a key russh handed over, as gunnar-core would.

Type Aliases§

Access
A grant level, ordered. Admin implies Write implies Read.
Fingerprint
A public key’s SHA-256 fingerprint in OpenSSH’s printed form, SHA256:<unpadded-base64>, the value the identity table is keyed on.
Principal
Who the session belongs to.
PrincipalKind
What kind of thing holds a key: a human, a machine account, a deploy key.