Step-by-step guide on how to set up a client with Altinn-scopes and custom keys.
Setting up a maskinporten client with a custom key
To follow this guide you must have a user in
Samarbeidsportalen with access to
Read more about creating user in Samarbeidsportalen here.
Login to Samarbeidsportalen.
Integrasjoner for the environment you want.
Ver2 is test and
Produksjon is production.
Fill in the scheme like below and then
Opprett. We has named our example-client Altinn CLI Client.
The tree scopes you need is
The value of
Integrasjonens identifikator value will be the
appsettings.json for Altinn CLI.
Now we can add own public keys. First we must generate a new JSON Web Key.
In this example we use mkjwk.org.
Fill in values like the example below and
Then you will get keys like this.
This public key we will add to our client in Samarbeidsportalen.
Egne public nøkler
The key must be stored in an array so add .
Copy the public key from the JSON Web key (marked 1 in the picture) and paste this into the array. Press
Now the client in maskinporten is complete.
The last part will be to use the public and private keypair in the Altinn CLI application.
Copy this (marked 2 in the picture) and Base64 encode it. Base64encode.org can be used for encoding.
Then use this value as