What the key pair reaches
Ankra keeps the private key in its vault and never shows it again: no list, read or log carries it. With it, Ankra signs in for access tokens that last an hour. TransIP lists each token in the control panel under its label, which starts withankra-.
Ankra uses the key pair for these calls only:
The account’s request limit counts every call above, along with your own tooling’s. See what to know about TransIP.
Creating a TransIP credential
1
Switch the API on and make a key pair at TransIP
- Sign in to the TransIP control panel. Open your profile at the top right, then My account, then API.
- Set the API’s status to on, if it is not already.
- Add a key pair. Decide first whether it should accept only whitelisted IP addresses - see the IP whitelist.
- Copy the private key. TransIP shows it once, when the key pair is made. Keep it in a secret manager, and never put it in Git, a ticket or a command line.
2
Add it to Ankra
- Portal
- CLI
Go to Integrations & alerts → Credentials, click Add credential, and under Cloud providers choose TransIP. Before the TransIP fields, the form warns This key pair can change your whole TransIP account. Enter:
- Name: 3 to 100 lowercase letters, digits and single hyphens (for example
transip-prod). It cannot change later. - Login: the login you sign in to the TransIP control panel with.
- Private key: paste the whole key, including its BEGIN and END lines, or click Read it from a file. The control panel hands out a PKCS #8 key (
-----BEGIN PRIVATE KEY-----); a PKCS #1 RSA key (-----BEGIN RSA PRIVATE KEY-----) works too. A key protected with a passphrase does not.
credentials.write to add the credential or replace its key (the built-in owner and admin roles have it). See Credentials.
The IP whitelist
When you add a key pair, TransIP offers to accept requests from whitelisted IP addresses only. The option is on unless you untick it, and one whitelist serves every key pair of the account that uses it. With it on, TransIP refuses Ankra until the address Ankra calls from is on the whitelist. Ankra calls TransIP over IPv4 only, so that address is an IPv4 address.Ankra does not publish a fixed list of the addresses it calls TransIP from yet.
- Keep the whitelist and add Ankra’s address. Test the connection. When TransIP refuses the address and reports the one it saw, the result names it: “TransIP refused the request: this key pair only accepts whitelisted IP addresses, and Ankra called from <address>. Add <address> to the IP whitelist of the account’s API settings in the TransIP control panel.” Add it and test again. When TransIP does not report it, the result says “TransIP did not say which address it saw”, and the way on is a key pair without the whitelist. The jobs that create, scale and delete clusters may call from another address; a refusal there names that address the same way when TransIP reports it. If Ankra’s address changes later, TransIP refuses Ankra until the new one is added.
- Use a key pair without the whitelist. Untick the option when you add the key pair. It keeps working if Ankra’s address changes. The whole-account reach above then matters even more, so keep the key in a secret manager.