Jämförda versioner

Nyckel

  • Dessa rader lades till.
  • Denna rad togs bort.
  • Formateringen ändrades.

...


AuthnRequest utan index

Kodblock
languagexml
themeRDark
titleBeror på...
<samlp:AuthnRequest xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"
    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    ForceAuthn="false" IsPassive="false" ProviderName="Sp Example Name"
    ID="ID850325636986645032969715339748802383986121801227" Version="2.0"
    IssueInstant="2013-03-21T09:31:17.235Z" Destination="https://auth.dev.inera.test:443/saml/HTTP-Redirect"
    Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified">

Här har skickar SP:n inte med något index. I exemplen ovan så leder detta till att "index=0" kommer att användas (dvs utan HSA-uppslag), eftersom "index=0" var satt som default.

Förval av principalen

Som SP finns möjligheten att på förhand ange information om användaren som inloggningen ska slutföras med. IdP stödjer idag förval av personnummer, tjänste-id, medarbetaruppdrags-id, organisationsnummer eller orgAffiliation och skickas in som Extension i AuthnRequesten och benämns PrincipalSelection. Dess värden kan användas enskilt men också kombineras med varandra. IdP ser de tillhandahållna uppgifter som tvingande uppgifter som måste uppfyllas för att slutföra inloggningen. Vidare så gäller att ifall flera av dessa principal-fält specifierats via PrincipalSelection måste samtliga uppfyllas, det räcker alltså inte ifall bara något eller några av PrincipalSelectionprincipal-värden matchar. Skulle det visa sig att användarens uppgifter inte stämmer överens med det som skickats via PrincipalSelection kommer inloggningen markeras som misslyckad. Under filtreringen försöker IdP:n göra ett val automatiskt baserad på den informationen som tagits emot i den AuthnRequest som skickats in. Om det är möjligt kan alltså exempelvis ett specifikt tjänste-id pekas ut och användaren slipper göra ett aktivt val i IdP:n. Om den angivna informationen inte är tillräckligt precis för att göra ett automatiskt val kommer användaren presenteras med tjänste-id eller medarbetaruppdragsväljaren i IdP:ns GUI.

De värden som avläses i IdP:n för PrincipalSelection är:

MatchValueAnvänds förFormat
urn:credential:personalIdentityNumberPersonidentifierare<psc:MatchValue Name="urn:credential:personalIdentityNumber" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">personalIdentityNumber</psc:MatchValue>
http://sambi.se/attributes/1/personalIdentityNumberPersonidentifierare<psc:MatchValue Name="http://sambi.se/attributes/1/personalIdentityNumber" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">personalIdentityNumber</psc:MatchValue>
http://sambi.se/attributes/1/employeeHsaIdPersonidentifierare<psc:MatchValue Name="http://sambi.se/attributes/1/employeeHsaId" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">employeeHsaId</psc:MatchValue>
http://sambi.se/attributes/1/commissionHsaIdFiltrering av Medarbetaruppdrag<psc:MatchValue Name="http://sambi.se/attributes/1/commissionHsaId" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">commissionHsaId</psc:MatchValue>
urn:orgAffiliationFiltrering av Medarbetaruppdrag<psc:MatchValue Name="urn:orgAffiliation" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">employeeHsaId@organizationIdentifier</psc:MatchValue>
http://sambi.se/attributes/1/organizationIdentifierFiltrering av Medarbetaruppdrag<psc:MatchValue Name="http://sambi.se/attributes/1/organizationIdentifier" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">organizationIdentifier</psc:MatchValue>

I exemplet nedan förväntas användaren bli inloggad med personnummer 194211196979, tjänste-id:t TSTNMT2321000156-10NG för organisationen med organisationsnumret 232100-0214.

Kodblock
languagexml
themeRDark
titlePrincipalSelection
<saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
  Destination="https://idp.dev.inera.test:8443/saml/sso/HTTP-POST"
  ForceAuthn="false"
  ID="a4c722ff-4a14-4719-9c11-a36a47c00139"
  IsPassive="false"
  IssueInstant="2023-10-19T08:50:52.279Z"
  ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
  Version="2.0">
  <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://sp.dev.inera.test:8881</saml2:Issuer>
  <saml2p:Extensions>
    <psc:PrincipalSelection xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">
      <psc:MatchValue Name="http://sambi.se/attributes/1/personalIdentityNumber" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">194211196979</psc:MatchValue>
      <psc:MatchValue Name="urn:orgAffiliation" xmlns:psc="http://id.swedenconnect.se/authn/1.0/principal-selection/ns">SE2321000040-4C08@2321000040</psc:MatchValue>  
    </psc:PrincipalSelection>
  </saml2p:Extensions>
</saml2p:AuthnRequest>