-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ssi): adjust framework creation endpoint #70
Conversation
@@ -77,11 +77,11 @@ protected override Task HandleRequirementAsync(AuthorizationHandlerContext conte | |||
private void InitializeClaims(ClaimsPrincipal principal) | |||
{ | |||
var preferredUserName = principal.Claims.SingleOrDefault(x => x.Type == ClaimTypes.PreferredUserName)?.Value; | |||
if (!Guid.TryParse(preferredUserName, out var identityId)) | |||
var sub = principal.Claims.SingleOrDefault(x => x.Type == ClaimTypes.Sub)?.Value; | |||
if (!Guid.TryParse(preferredUserName, out var identityId) && !Guid.TryParse(sub, out identityId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is misleading as it results in log-message referring to preferredUserName
also 'sub' is not supposed to contain an identityId. It contains the keycloak users primary key (see the equivalent code in portal: https://github.com/eclipse-tractusx/portal-backend/blob/f43eadae29a5b93022e7794cec0381d970339637/src/web/Web.Identity/MandatoryIdentityClaimHandler.cs#L109 )
* adjust endpoint create framework credential to take the bpn of the request * adjust claim handler to support serviceAccounts as well
catch (Exception e) | ||
{ | ||
throw new ArgumentException($"{member.DeclaringType?.Name}.{member.Name} is not assignable from {expression}, {e.Message}", e); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
src/database/SsiCredentialIssuer.Entities/Auditing/Attributes/AuditEntityV2Attribute.cs
Fixed
Show fixed
Hide fixed
adjust the identityId to string to be able to save the clientId of a technical user
38f0533
to
c2c1667
Compare
Quality Gate failedFailed conditions |
Description
Why
The id of the technical user isn't taken correctly
Issue
N/A
Corresponding Backend PR
#646
Checklist