Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Event

Payload

Description

kam-mf-selected

Code Block
languagejs
{
  microFrontendName: string;
}

Event emitted by the shell application, when a micro frontend is selected in the navbar. Intended use is to reset navigation

kam-shell-context-changed

Code Block
languagejs
{
  userContext: {
    careTeamName: string | null;
    careTeamReference: string | null;
    organizationName: string;
    organizationReference: string;
    isCurrent: boolean;
    oioRoles: string[];
  }
}

Event emitted when the user context in the toolbar changes.

Routing
Anchor
Routing
Routing

...

Kam-ui is the shell application of KAM. It handles all authentication of the app and authorization to access each micro frontend. In kam-ui an user can select a context with roles which allow them access to specific micro frontends. The user can access micro frontends by navigating to “Administrativt” in the top toolbar and selecting a micro frontend from the left navbar.

Headers

Content Security Policy (CSP)

The shell application specifies the CSP header and is configured to only allow specified domains.

The CSP header is configured specifically for each environment.

To help micro frontend developers the CSP header is set to Report-Only in environments devenvcgi and inttest. The browser will throw an error in the console if the CSP header is violated.

Developers of micro frontends must inform Systematic if the CSP should be updated to accommodate the needs of the micro frontend as the header will block calls (Report only on devenvcgi and inttest)

Example inttest

Code Block
Content-Security-Policy 
  "default-src 'self' *.inttest.ehealth.sundhed.dk; 
  style-src 'self' *.inttest.ehealth.sundhed.dk 'unsafe-inline'; 
  script-src-elem 'self' *.inttest.ehealth.sundhed.dk; 
  connect-src 'self' *.inttest.ehealth.sundhed.dk; 
  font-src 'self' *.inttest.ehealth.sundhed.dk fonts.gstatic.com;
  img-src 'self' *.inttest.ehealth.sundhed.dk data:";

Calling FUT infrastructure from micro frontend

...