Gateway Principals and Logins
Gateway Principals and Logins
A principal is who a connection acts as. It fixes the company, the storage root, and which routes apply. A credential is the auth material that resolves to one. A principal may hold several credentials — for rotation, or because two systems on the partner's side connect differently.
Both live on the Principals tab. Creating a principal needs DataMagik - Builder; adding a credential needs Builder or DataMagik - Security, because a credential is a secret even when the form only ever writes it.
Creating a principal
- Open Principals and give it a name — usually the partner's name.
- Choose a kind:
- External partner — another company. Gets a locked single-partner root; org-to-org isolation is the invariant the whole design is built around. Link it to a trading partner to enable collect-from-gateway delivery.
- Our own system — one of your machines or applications.
- Press Create. A storage root is assigned automatically and shown on the card.
Deleting a principal removes it and its credentials but keeps every file it ever sent. Those are the record of what a partner actually delivered, and revoking a login should not erase history.
Authentication methods
| Method | Protocol | Resolved by |
|---|---|---|
| Password | SFTP, FTPS | Username, compared against a stored hash. Minimum 12 characters. |
| SSH key | SFTP | Key fingerprint. No secret is stored at all. |
| SSH certificate | SFTP | A certificate signed by a trusted CA, carrying the identity this credential requires. |
| X.509 certificate | FTPS | A certificate chaining to a trusted CA; expiry and revocation checked. |
All four are created the same way, from the Add credential row on a principal's card. The row changes to ask for what the chosen method actually needs.
Adding a password login
- On the principal's card, type a username.
- Leave the type as Password and enter one of at least 12 characters.
- Press Add.
acme-steel-po, not ftp.Adding an SSH key login
Ask the partner to generate a key pair and send you the public half only:
ssh-keygen -t ed25519 -C "acme-steel-gateway"
cat ~/.ssh/id_ed25519.pub
Paste that line into the credential field with type SSH key. It looks like
ssh-ed25519 AAAAC3Nza… acme-steel-gateway. DataMagik stores the fingerprint; there is no
secret at rest on either side.
Adding a certificate login
A certificate credential trusts a certificate authority rather than one specific key, which is what lets a partner rotate their own keys without telling you every time.
- Create or register the CA first, on the Security tab — an issuing CA of your own, or the partner's.
- On the principal, type a username and choose SSH certificate (SFTP) or X.509 certificate (FTPS).
- Pick the certificate authority. The picker only offers CAs of the matching kind — SSH CAs for an SSH certificate, X.509 CAs for FTPS — and tells you which one to create if there is none yet.
- Enter the certificate identity: the principal name inside the certificate that this credential will accept.
- Press Add.
Issuing a certificate from your own CA
If the CA is one you generated, you can issue the partner's certificate yourself. On the Security tab, each of your issuing CAs carries an Issue certificate action:
- Enter the identity — the same value you put on the credential.
- Set the validity in days (365 by default, 730 maximum).
- Press Issue certificate.
To withdraw a certificate before it expires, revoke it — see Trust & Certificates.
Restricting where a login may connect from
A credential can carry an IP allowlist of bare addresses or CIDR ranges. A malformed entry denies rather than being skipped — somebody who typed a bad CIDR meant to restrict access, and quietly ignoring it would grant exactly what they were trying to prevent.
Why every login is a service account
There is no human sign-in path to the gateway, on purpose. External partners and your own systems have the same shape: a credential resolves to a principal, which fixes a company and a scope. One authentication model means one place for isolation to be correct, rather than a matrix of special cases.