Skip to content

Commit

Permalink
Click email text element on login page return bug resolved.
Browse files Browse the repository at this point in the history
Docs, DK privilege claim transformer updated
  • Loading branch information
Revsgaard committed Nov 10, 2023
1 parent 16df886 commit 9a28831
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
5 changes: 2 additions & 3 deletions FoxIDs.sln
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{CB5D86A0-D
docs\email.md = docs\email.md
docs\faq.md = docs\faq.md
docs\foxids-inside.md = docs\foxids-inside.md
docs\howto-connect.md = docs\howto-connect.md
docs\get-started.md = docs\get-started.md
docs\howto-connect.md = docs\howto-connect.md
docs\howto-oidc-foxids.md = docs\howto-oidc-foxids.md
docs\howto-saml-2.0-context-handler.md = docs\howto-saml-2.0-context-handler.md
docs\howto-tracklink-foxids.md = docs\howto-tracklink-foxids.md
Expand Down Expand Up @@ -159,7 +159,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{CB8812
docs\images\howto-saml-context-handler-down-ct2.png = docs\images\howto-saml-context-handler-down-ct2.png
docs\images\howto-saml-context-handler-up-attributes.png = docs\images\howto-saml-context-handler-up-attributes.png
docs\images\howto-saml-context-handler-up-nameidformat.png = docs\images\howto-saml-context-handler-up-nameidformat.png
docs\images\howto-saml-context-handler-up-privilege-claim-tf.png = docs\images\howto-saml-context-handler-up-privilege-claim-tf.png
docs\images\howto-saml-context-handler-up-read-metadata.png = docs\images\howto-saml-context-handler-up-read-metadata.png
docs\images\howto-saml-nemlogin3-certificate-container-type.png = docs\images\howto-saml-nemlogin3-certificate-container-type.png
docs\images\howto-saml-nemlogin3-certificate.png = docs\images\howto-saml-nemlogin3-certificate.png
Expand All @@ -171,10 +170,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{CB8812
docs\images\howto-saml-nemlogin3-up-claims.png = docs\images\howto-saml-nemlogin3-up-claims.png
docs\images\howto-saml-nemlogin3-up-contact.png = docs\images\howto-saml-nemlogin3-up-contact.png
docs\images\howto-saml-nemlogin3-up-nameidformat.png = docs\images\howto-saml-nemlogin3-up-nameidformat.png
docs\images\howto-saml-nemlogin3-up-privilege-claim-tf.png = docs\images\howto-saml-nemlogin3-up-privilege-claim-tf.png
docs\images\howto-saml-nemlogin3-up-read-metadata.png = docs\images\howto-saml-nemlogin3-up-read-metadata.png
docs\images\howto-saml-nemlogin3-up-top.png = docs\images\howto-saml-nemlogin3-up-top.png
docs\images\howto-tracklink-foxids-down-party.png = docs\images\howto-tracklink-foxids-down-party.png
docs\images\howto-saml-privilege-claim-tf.png = docs\images\howto-saml-privilege-claim-tf.png
docs\images\howto-tracklink-foxids-up-party.png = docs\images\howto-tracklink-foxids-up-party.png
docs\images\master-tenant2.png = docs\images\master-tenant2.png
docs\images\parties-down-party-oauth.svg = docs\images\parties-down-party-oauth.svg
Expand Down
21 changes: 15 additions & 6 deletions docs/claim-transform-dk-privilege.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DK privilege - claim transforms

FoxIDs support claim transforms of DK privilege used in Danish IdPs like [NemLog-in](up-party-howto-saml-2.0-nemlogin.md) and [Context Handler](howto-saml-2.0-context-Handler.md).
FoxIDs support claim transforms of DK privilege used in Danish [NemLog-in](up-party-howto-saml-2.0-nemlogin.md) and [Context Handler](howto-saml-2.0-context-Handler.md) IdPs.

Supported privilege standard:

Expand All @@ -9,14 +9,23 @@ Supported privilege standard:
- FoxIDs support both to read the base64-encoded privilege string from the standard claim `https://data.gov.dk/model/core/eid/privilegesIntermediate` and a custom defined claim.

## Configuring DK privilege - claim transforms
The DK privilege can both be configured in a SAML 2.0 up-party and down-party and furthermore in a OpenID Connect up-party and down-party.
The DK privilege can both be configured in a SAML 2.0 up-party and down-party and likewise in a OpenID Connect up-party and down-party.

DK privilege claim transforms in [FoxIDs Control Client](control.md#foxids-control-client):
- In SAML 2.0 the DK privilege claim transformer default read the standard claim `https://data.gov.dk/model/core/eid/privilegesIntermediate` and issue the transformed claim `http://schemas.foxids.com/identity/claims/privilege`.
- In OpenID Connect the DK privilege claim transformer default read the standard claim `privileges_intermediate` and issue the transformed claim `privilege`.

- SAML 2.0 up-party and down-party default read the standard claim `https://data.gov.dk/model/core/eid/privilegesIntermediate` and issues transformed claims in `http://schemas.foxids.com/identity/claims/privilege`.
- OpenID Connect up-party and down-party default read the claim `privileges_intermediate` and issues transformed claims in `privilege`.
Configure the DK privilege claim transformer on SAML 2.0 up-party in [FoxIDs Control Client](control.md#foxids-control-client):

> Remember to add a [claim mapping](saml-2.0.md#claim-mappings) from SAML `http://schemas.foxids.com/identity/claims/privilege` to JWT `privilege` in the settings section. If you use a [SAML 2.0 up-party](up-party-saml-2.0.md) and a [OpenID Connect down-party](down-party-oidc.md).
1. Select the Claim transform tab
1. Click Add claim transform and click DK XML privilege to JSON.
1. Then again, click Add claim transform and click Match claim.
2. Select to remove the original privilege claim `https://data.gov.dk/model/core/eid/privilegesIntermediate` from the claims pipeline.
3. Click update

![Context Handler SAML 2.0 up-party privilege claim transformation](images/howto-saml-privilege-claim-tf.png)


> Remember to add a [claim mapping](saml-2.0.md#claim-mappings) from SAML `http://schemas.foxids.com/identity/claims/privilege` to JWT `privilege` in the settings section. If you e.g. use a [SAML 2.0 up-party](up-party-saml-2.0.md) and a [OpenID Connect down-party](down-party-oidc.md).
## Model 2
The DK privilege claim is transformed into a list of claims, one claim for each group. The XML PrivilegeGroup element is transformed into a JSON object and serialized as a string.
Expand Down
4 changes: 3 additions & 1 deletion docs/howto-saml-2.0-context-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ Furthermore, it makes the tokens readable.
2. Remove the original privilege claim from the claims pipeline.
3. Click update

![Context Handler SAML 2.0 up-party privilege claim transformation](images/howto-saml-context-handler-up-privilege-claim-tf.png)
![Context Handler SAML 2.0 up-party privilege claim transformation](images/howto-saml-privilege-claim-tf.png)

> Remember to add a claim mapping from SAML `http://schemas.foxids.com/identity/claims/privilege` to JWT `privilege` please see next section 4).
**4 - Add SAML 2.0 claim to JWT claim mappings in [FoxIDs Control Client](control.md#foxids-control-client)**

Expand Down
Binary file not shown.
Binary file not shown.
Binary file added docs/images/howto-saml-privilege-claim-tf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/up-party-howto-saml-2.0-nemlogin.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ First you need to create an NemLog-in IT-system or have someone else creating an
FoxIDs can transforms the [DK privilege XML claim](claim-transform-dk-privilege.md) to a JSON claim. It is recommended to add the transformation in order to obtain smaller claims and tokens.
Furthermore, it makes the tokens readable.

1. Set the privilege claim depending of the Context Handler version.
1. Add the DK privilege claim transformer.
2. Remove the original privilege claim from the claims pipeline.

![NemLog-in SAML 2.0 up-party privilege claim transformation](images/howto-saml-nemlogin3-up-privilege-claim-tf.png)
![NemLog-in SAML 2.0 up-party privilege claim transformation](images/howto-saml-privilege-claim-tf.png)

**4 - Add SAML 2.0 claim to JWT claim mappings in [FoxIDs Control Client](control.md#foxids-control-client)**

Expand Down
2 changes: 1 addition & 1 deletion src/FoxIDs/Views/Login/Password.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="form-group active-group active">
<div class="base-for-overlap">
<input asp-for="Email" id="showEmail" disabled autocomplete="off" class="form-control input-control bg-light" />
<div class="overlap" onclick="location.href = '[email protected]';"></div>
<div class="overlap" onclick="location.href = '../[email protected]';"></div>
</div>
<label asp-for="Email" id="showEmail" class="label-control"></label>
<span asp-validation-for="Email"></span>
Expand Down

0 comments on commit 9a28831

Please sign in to comment.