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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
2cd1c1bf
Commit
2cd1c1bf
authored
Apr 05, 2017
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init keyTab (#707)
parent
c4b27b9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
+10
-4
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
View file @
2cd1c1bf
...
...
@@ -19,6 +19,11 @@ extends 'Lemonldap::NG::Portal::Auth::Base';
sub
init
{
my
(
$self
)
=
@_
;
unless
(
$self
->
keytab
(
$self
->
conf
->
{
krbKeyTab
})){
$self
->
error
('
Keytab not defined
');
return
0
;
}
return
1
;
}
sub
extractFormInfo
{
...
...
@@ -44,13 +49,14 @@ sub extractFormInfo {
$self
->
userLogger
->
error
(
'
Bad authorization header:
'
.
$@
);
return
PE_BADCREDENTIALS
;
}
my
$server_context
;
$ENV
{
KRB5_KTNAME
}
=
$self
->
keytab
;
my
$gss_client_name
;
my
$status
=
GSSAPI::Context::
accept
(
$server_context
,
my
$server_context
,
GSS_C_NO_CREDENTIAL
,
$data
,
GSS_C_NO_CHANNEL_BINDINGS
,
my
$gss_client_name
,
$gss_client_name
,
my
$out_mech
,
my
$gss_output_token
,
my
$out_flags
,
...
...
@@ -80,7 +86,7 @@ sub authenticate {
sub
setAuthSessionInfo
{
my
(
$self
,
$req
)
=
@_
;
$req
->
{
sessionInfo
}
->
{
authenticationLevel
}
=
$self
->
conf
->
{
SSL
AuthnLevel
};
$req
->
{
sessionInfo
}
->
{
authenticationLevel
}
=
$self
->
conf
->
{
krb
AuthnLevel
};
PE_OK
;
}
...
...
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