ID-porten Setup

Test Users

Configuration

This is the configuration for finsta-staging. Update the configuration regarding Google Project Id and hostname for your setup.

ID-porten

  1. Go to Samarbeidsportalen

  2. Login and choose Integrasjoner → Ny Integrasjon

  3. Difi-tjeneste → API-klient

  4. Legg til scopes → profile,openid,user/kontaktinformasjon.read,user.spraak.read,skatteetaten:formueinntekt/skattemelding

  5. Kundens org.nr → 917760187

  6. Navn på integrasjonen → tritt-test-220524

  7. Beskrivelse → Integrasjon for tritt-test-220524

  8. Grant Types → [authorization_code,refresh_token]

  9. Klientautentiseringsmetode → client_secret_basic

  10. Applikasjonstype → web

  11. Gyldig(e) redirect uri-er → https://tritt-test-220524.firebaseapp.com/__/auth/handler

  12. Gyldig(e) post logout redirect uri-er → https://finsta.test.tritt.dev/, http://finsta.tritt.test/

  13. Tilbake-uri* → https://finsta.test.tritt.dev/*

  14. Klikk lagre og vare på client_id og client_secret fra popup

Google Cloud

  1. Go to Google Cloud Console

  2. Select the project you want to manage

  3. Go to Identity Platform → Identity Platform → Add a Provider

  4. Select a provider → OpenID Connect

  5. Choose Grant Type → Code Flow

  6. Name → idporten

  7. Client ID → The client id value from the ID-porten configuration (Integrasjonens identifikator)

  8. Issuer → https://oidc-ver2.difi.no/idporten-oidc-provider

  9. Client Secret → The client secret from the ID-porten configuration

  10. Remember to add the correct domain under Authorized Domains in the right menu

How to validate against ID-porten

  1. Go to Firebase Console

  2. Choose tritt-test-220524

  3. Choose Build → Firestore Database

  4. Select users → RWutktfC3DPazEc5HlkCI0ujsXH2 (kjell@tritt.no) → userOrganizatons and select Delete collection from the dot menu on the upper right

  5. In IntelliJ run Deploy [dev-staging]

  6. Go to http://finsta.tritt.test

  7. Login in with username kjell@tritt.no with password colaboks

  8. Create a new organization with org.nr 910215663

  9. Create a new financial statement and upload a trial balance

  10. Select Næringsspesifikasjon and click Valider from the right menu

  11. In the ID-porten popup log in with username 27107900352, password password01 and pin code 12345.

  12. After a few seconds the xml result from the validation should be in the response_body column in the submission table in the schema for the tenant.