Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
c6137d12
Commit
c6137d12
authored
Nov 06, 2017
by
Clément OUDOT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possibility to override SAML Issuer value with domain (
#1324
)
parent
17fbd637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
+18
-1
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
View file @
c6137d12
...
...
@@ -185,6 +185,13 @@ sub run {
$url
=
$self
->
normalize_url
(
$url
,
$self
->
conf
->
{
issuerDBSAMLPath
},
$self
->
ssoGetUrl
);
# Get domain GET attribute
my
$domain
=
$req
->
param
('
domain
');
if
(
$domain
)
{
$self
->
logger
->
debug
("
Found domain
$domain
in SAML GET parameter
");
}
# 1.1. SSO (SSO URL or Proxy Mode)
if
(
$url
=~
$self
->
ssoUrlRe
or
$req
->
datas
->
{
_proxiedRequest
}
)
{
...
...
@@ -623,6 +630,16 @@ sub run {
return
PE_SAML_SSO_ERROR
;
}
# Rewrite Issuer with domain
if
(
$domain
)
{
my
$original_issuer
=
$login
->
response
->
Issuer
->
content
;
$self
->
logger
->
debug
(
"
Add domain
$domain
to Issuer
$original_issuer
");
my
$new_issuer
=
$original_issuer
.
"
?domain=
$domain
";
$login
->
response
->
Issuer
->
content
(
$new_issuer
);
$login
->
response
->
Assertion
->
Issuer
->
content
(
$new_issuer
);
}
# Set subject NameID
$response_assertions
[
0
]
->
set_subject_name_id
(
$login
->
nameIdentifier
);
...
...
@@ -1434,7 +1451,7 @@ sub sloServer {
else
{
$local_session_id
=
$req
->
id
;
$self
->
logger
->
debug
(
"
Get session id
$local_session_id
(from cookie)
"
);
"
Get session id
$local_session_id
(from cookie)
");
}
if
(
$req
->
{
sessionInfo
}
)
{
$session
=
$req
->
{
sessionInfo
}
->
{
_lassoSessionDump
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment