Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-grid5000
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
SIMONIN Matthieu
python-grid5000
Commits
2b36e852
Commit
2b36e852
authored
5 years ago
by
Luke Bertot
Browse files
Options
Downloads
Patches
Plain Diff
Users can now specify the default user when using an SSL client certificate.
parent
96269849
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!3
Users can now specify the default user when using an SSL client certificate.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grid5000/__init__.py
+4
-2
4 additions, 2 deletions
grid5000/__init__.py
with
4 additions
and
2 deletions
grid5000/__init__.py
+
4
−
2
View file @
2b36e852
...
@@ -63,6 +63,7 @@ class Grid5000(object):
...
@@ -63,6 +63,7 @@ class Grid5000(object):
session
=
None
,
session
=
None
,
sslcert
=
None
,
sslcert
=
None
,
sslkey
=
None
,
sslkey
=
None
,
ssluser
=
'
anonymous
'
,
**
kwargs
**
kwargs
):
):
self
.
_uri
=
uri
self
.
_uri
=
uri
...
@@ -75,6 +76,7 @@ class Grid5000(object):
...
@@ -75,6 +76,7 @@ class Grid5000(object):
self
.
client_cert
=
None
self
.
client_cert
=
None
if
sslcert
is
not
None
:
if
sslcert
is
not
None
:
self
.
client_ssl
=
True
self
.
client_ssl
=
True
self
.
default_ssl_user
=
ssluser
if
sslkey
is
not
None
:
if
sslkey
is
not
None
:
self
.
client_cert
=
(
sslcert
,
sslkey
)
self
.
client_cert
=
(
sslcert
,
sslkey
)
else
:
else
:
...
@@ -161,8 +163,8 @@ class Grid5000(object):
...
@@ -161,8 +163,8 @@ class Grid5000(object):
request_headers
[
"
X-Api-User-CN
"
]
=
user_id
request_headers
[
"
X-Api-User-CN
"
]
=
user_id
request_headers
[
"
X-Remote-Ident
"
]
=
user_id
request_headers
[
"
X-Remote-Ident
"
]
=
user_id
else
:
else
:
request_headers
[
"
X-Api-User-CN
"
]
=
"
anonymous
"
request_headers
[
"
X-Api-User-CN
"
]
=
self
.
default_ssl_user
request_headers
[
"
X-Remote-Ident
"
]
=
"
anonymous
"
request_headers
[
"
X-Remote-Ident
"
]
=
self
.
default_ssl_user
else
:
else
:
res
[
"
auth
"
]
=
self
.
_http_auth
res
[
"
auth
"
]
=
self
.
_http_auth
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment