Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
sso
Commits
14c4c555
Commit
14c4c555
authored
Oct 15, 2016
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set audience restriction to issuer
parent
ae7c881d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/sso_server/sso_server/saml/base.py
src/sso_server/sso_server/saml/base.py
+3
-0
src/sso_server/sso_server/saml/registry.py
src/sso_server/sso_server/saml/registry.py
+5
-0
No files found.
src/sso_server/sso_server/saml/base.py
View file @
14c4c555
...
...
@@ -201,6 +201,9 @@ class Processor(object):
params
[
'REQUEST_ID'
]
=
request
[
'id'
]
params
[
'DESTINATION'
]
=
request
.
get
(
'destination'
,
''
)
params
[
'PROVIDER_NAME'
]
=
request
.
get
(
'providername'
,
''
)
issuer
=
soup
.
find
(
'saml:issuer'
)
if
issuer
:
params
[
'ISSUER'
]
=
issuer
.
string
self
.
_request_params
=
params
def
_reset
(
self
,
sp_config
=
None
):
...
...
src/sso_server/sso_server/saml/registry.py
View file @
14c4c555
...
...
@@ -28,6 +28,11 @@ class SSOProcessor(base.Processor):
def
_decode_request
(
self
):
self
.
_request_xml
=
zlib
.
decompress
(
base64
.
b64decode
(
self
.
_saml_request
),
-
15
)
def
_determine_audience
(
self
):
self
.
_audience
=
self
.
_request_params
.
get
(
'ISSUER'
,
None
)
if
not
self
.
_audience
:
super
(
SSOProcessor
,
self
).
_determine_audience
()
def
_format_assertion
(
self
):
# Add attributes that gitlab needs (?).
self
.
_assertion_params
[
'ATTRIBUTES'
]
=
{
...
...
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