Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
STS
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
apis
STS
Merge requests
!127
Fix: Exchanging Coscine certificate - Step 1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix: Exchanging Coscine certificate - Step 1
Issue/2147-exchangingCoscineCertificate
into
master
Overview
0
Commits
3
Pipelines
4
Changes
2
Merged
Hanna Führ
requested to merge
Issue/2147-exchangingCoscineCertificate
into
master
2 years ago
Overview
0
Commits
3
Pipelines
4
Changes
2
Expand
coscine/issues#2147
Edited
2 years ago
by
Hanna Führ
0
0
Merge request reports
Compare
master
version 2
9f48fdd3
2 years ago
version 1
78777915
2 years ago
master (base)
and
latest version
latest version
357caa36
3 commits,
2 years ago
version 2
9f48fdd3
2 commits,
2 years ago
version 1
78777915
1 commit,
2 years ago
2 files
+
36
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/STS/Controllers/ShibbolethController.cs
+
32
−
1
Options
@@ -37,6 +37,30 @@ namespace Coscine.Api.STS.Controllers
return
Redirect
(
UrlGenerator
.
GetLoginUrl
(
Request
));
}
foreach
(
var
claim
in
info
.
Principal
.
Claims
)
{
Console
.
WriteLine
(
"************************ claim ************************"
);
Console
.
WriteLine
(
"claim.Issue: "
+
claim
.
Issuer
);
Console
.
WriteLine
(
"claim.OriginalIssuer: "
+
claim
.
OriginalIssuer
);
Console
.
WriteLine
(
"--------------- claim.Properties ---------------"
);
foreach
(
var
entry
in
claim
.
Properties
)
{
Console
.
WriteLine
(
"claim.Properties entry.Key: "
+
entry
.
Key
+
" / claim.Properties entry.Value: "
+
entry
.
Value
);
}
Console
.
WriteLine
(
"claim.Subject.Actor: "
+
claim
.
Subject
.
Actor
);
Console
.
WriteLine
(
"claim.Subject.AuthenticationType: "
+
claim
.
Subject
.
AuthenticationType
);
Console
.
WriteLine
(
"claim.Subject.IsAuthenticated: "
+
claim
.
Subject
.
IsAuthenticated
);
Console
.
WriteLine
(
"claim.Subject.Label: "
+
claim
.
Subject
.
Label
);
Console
.
WriteLine
(
"claim.Subject.Name: "
+
claim
.
Subject
.
Name
);
Console
.
WriteLine
(
"claim.Subject.NameClaimType: "
+
claim
.
Subject
.
NameClaimType
);
Console
.
WriteLine
(
"claim.Subject.RoleClaimType: "
+
claim
.
Subject
.
RoleClaimType
);
Console
.
WriteLine
(
"claim.Type: "
+
claim
.
Type
);
Console
.
WriteLine
(
"claim.Value: "
+
claim
.
Value
);
Console
.
WriteLine
(
"claim.ValueType: "
+
claim
.
ValueType
);
}
var
externalAuthenticatorModel
=
new
ExternalAuthenticatorModel
();
var
shibbolethAuthItem
=
externalAuthenticatorModel
.
GetWhere
((
externalAuthenticator
)
=>
externalAuthenticator
.
DisplayName
==
"Shibboleth"
);
@@ -48,6 +72,8 @@ namespace Coscine.Api.STS.Controllers
entity
=
info
.
Principal
.
FindFirstValue
(
ShibbolethAttributeMapping
.
PairwiseID
);
}
Console
.
WriteLine
(
"entity for identifier: "
+
entity
);
var
identifier
=
""
;
var
entityId
=
""
;
if
(
entity
.
IndexOf
(
">"
)
>
-
1
)
@@ -63,7 +89,12 @@ namespace Coscine.Api.STS.Controllers
identifier
=
entity
;
entityId
=
info
.
AuthenticationProperties
.
Items
[
"idp"
];
}
Console
.
WriteLine
(
"identifier: "
+
identifier
);
Console
.
WriteLine
(
"entityId: "
+
entityId
);
Console
.
WriteLine
(
"shibbolethAuthItem.Id: "
+
shibbolethAuthItem
.
Id
);
var
mapping
=
externalIdModel
.
GetAllWhere
((
map
)
=>
map
.
ExternalId1
==
identifier
&&
map
.
ExternalAuthenticatorId
==
shibbolethAuthItem
.
Id
Loading