Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
667ff3b9
Commit
667ff3b9
authored
8 years ago
by
Cam Saül
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3727 from nickspacek/1113-mongo-delegated-authentication
#1113 Adds MongoDB delegated authentication
parents
49ce0dd7
4c712f23
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/driver/mongo.clj
+3
-0
3 additions, 0 deletions
src/metabase/driver/mongo.clj
src/metabase/driver/mongo/util.clj
+5
-2
5 additions, 2 deletions
src/metabase/driver/mongo/util.clj
with
8 additions
and
2 deletions
src/metabase/driver/mongo.clj
+
3
−
0
View file @
667ff3b9
...
...
@@ -192,6 +192,9 @@
:display-name
"Database password"
:type
:password
:placeholder
"******"
}
{
:name
"authdb"
:display-name
"Authentication Database"
:placeholder
"Optional database to use when authenticating"
}
{
:name
"ssl"
:display-name
"Use a secure connection (SSL)?"
:type
:boolean
...
...
This diff is collapsed.
Click to expand it.
src/metabase/driver/mongo/util.clj
+
5
−
2
View file @
667ff3b9
...
...
@@ -43,7 +43,7 @@
"Run F with a new connection (bound to `*mongo-connection*`) to DATABASE.
Don't use this directly; use `with-mongo-connection`."
[
f
database
]
(
let
[{
:keys
[
dbname
host
port
user
pass
ssl
]
(
let
[{
:keys
[
dbname
host
port
user
pass
ssl
authdb
]
:or
{
port
27017
,
pass
""
,
ssl
false
}}
(
cond
(
string?
database
)
{
:dbname
database
}
(
:dbname
(
:details
database
))
(
:details
database
)
; entire Database obj
...
...
@@ -53,9 +53,12 @@
user
)
pass
(
when
(
seq
pass
)
pass
)
authdb
(
if
(
seq
authdb
)
authdb
dbname
)
server-address
(
mg/server-address
host
port
)
credentials
(
when
user
(
mcred/create
user
dbname
pass
))
(
mcred/create
user
authdb
pass
))
connect
(
partial
mg/connect
server-address
(
build-connection-options
:ssl?
ssl
))
conn
(
if
credentials
(
connect
credentials
)
...
...
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