-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add readme and allow env configuration
- Loading branch information
1 parent
4fcae8c
commit 2b26456
Showing
5 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
### MongoDB enterprise with mock OIDC provider auth enabled | ||
|
||
```sh | ||
docker-compose -f oidc/mock-oidc-provider/docker-compose.yaml up | ||
``` | ||
|
||
#### How to connect | ||
|
||
```sh | ||
mongosh \ | ||
--host localhost \ | ||
--port 27017 \ | ||
--authenticationMechanism MONGODB-OIDC | ||
``` | ||
|
||
Connection string: | ||
|
||
``` | ||
mongodb://localhost:27017/?authMechanism=MONGODB-OIDC | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import path from 'path'; | ||
|
||
import ConnectionString from 'mongodb-connection-string-url'; | ||
|
||
const port = '27017'; | ||
|
||
const connectionString = new ConnectionString(`mongodb://localhost:${port}`); | ||
connectionString.searchParams.set('authMechanism', 'MONGODB-OIDC'); | ||
|
||
export default { | ||
dockerCompose: { | ||
projectName: path.basename(__dirname), | ||
yamlPath: path.resolve(__dirname, 'docker-compose.yaml'), | ||
}, | ||
waitOn: [`tcp:${port}`], | ||
connections: { | ||
oidc: { | ||
connectionString: connectionString.href, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
services: | ||
mongodb-server-with-mock-oidc-provider: | ||
build: . | ||
ports: | ||
- '27017:27017' | ||
- '29091:29091' | ||
environment: | ||
- OIDC_TOKEN_PAYLOAD_EXPIRES_IN | ||
# comma-separated list | ||
- OIDC_TOKEN_PAYLOAD_GROUPS | ||
- OIDC_TOKEN_PAYLOAD_SUB | ||
- OIDC_TOKEN_PAYLOAD_AUD |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters