Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
keystore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Show more breadcrumbs
id
keystore
Commits
b31d53b1
Commit
b31d53b1
authored
7 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Use defaults when public_key_attr/private_key_attr are unset
parent
bb1e782a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/ldap.go
+7
-2
7 additions, 2 deletions
backend/ldap.go
with
7 additions
and
2 deletions
backend/ldap.go
+
7
−
2
View file @
b31d53b1
...
...
@@ -43,11 +43,16 @@ func (c *LDAPQueryConfig) Valid() error {
}
c
.
scope
=
s
}
// Since two different daemons use this code, with separate
// configs, and one of them does not need one of these
// attributes, it's more practical to set defaults rather than
// complain if values are unset.
if
c
.
PublicKeyAttr
==
""
{
return
errors
.
New
(
"empty public_key_attr"
)
c
.
PublicKeyAttr
=
"userPublicKey"
}
if
c
.
PrivateKeyAttr
==
""
{
return
errors
.
New
(
"empty public_key_attr"
)
c
.
PrivateKeyAttr
=
"userEncryptedKey"
}
return
nil
}
...
...
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