-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source MongoDb: added support via TLS/SSL #6364
Changes from 7 commits
93a1a26
dd04c26
b3de9aa
d78e3f5
7b9093d
1b08e06
d3e708c
d8411a4
66f8dd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,29 @@ the Dockerfile. | |
We use `JUnit` for Java tests. | ||
|
||
### Test Configuration | ||
No specific configuration needed for testing, MongoDb Test Container is used. | ||
|
||
In order to test the MongoDb source, you need to have a standalone instance, a replica set or Atlas cluster. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it doesn't work with a docker image anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works, but I've also added test for Atlas Cluster with ssl, I've corrected doc. |
||
|
||
## Community Contributor | ||
|
||
As a community contributor, you will need to have an Atlas cluster to test MongoDb source. | ||
|
||
1. Create `secrets/credentials.json` file | ||
1. Insert below json to the file with your configuration | ||
``` | ||
{ | ||
"database": "database_name", | ||
"user": "user", | ||
"password": "password", | ||
"cluster_url": "cluster_url" | ||
} | ||
``` | ||
|
||
## Airbyte Employee | ||
|
||
1. Access the `MONGODB_TEST_CREDS` secret on LastPass | ||
1. Create a file with the contents at `secrets/credentials.json` | ||
|
||
|
||
#### Acceptance Tests | ||
To run acceptance and custom integration tests: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"instance_type": { | ||
"type": "object", | ||
"title": "MongoDb instance type", | ||
"description": "MongoDb instance to connect to.", | ||
"description": "MongoDb instance to connect to. For MongoDB Atlas and Replica Set TLS connection is used by default.", | ||
"order": 0, | ||
"oneOf": [ | ||
{ | ||
|
@@ -34,13 +34,20 @@ | |
"default": 27017, | ||
"examples": ["27017"], | ||
"order": 1 | ||
}, | ||
"tls": { | ||
"title": "TLS connection", | ||
"type": "boolean", | ||
"description": "Indicates whether TLS encryption protocol will be used to connect to MongoDB. It is recommended to use TLS connection if possible. For more information see <a href=\"https://docs.airbyte.io/integrations/sources/mongodb-v2\">documentation</a>.", | ||
"default": false, | ||
"order": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"title": "Replica Set", | ||
"additionalProperties": false, | ||
"required": ["server_addresses", "replica_set"], | ||
"required": ["server_addresses"], | ||
"properties": { | ||
"server_addresses": { | ||
"title": "Server addresses", | ||
|
@@ -98,13 +105,6 @@ | |
"default": "admin", | ||
"examples": ["admin"], | ||
"order": 4 | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you will need to make additionalProperties=true for this to be backwards compatible, and potentially handle it manually in the connector code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot, I've added. |
||
"tls": { | ||
"title": "TLS connection", | ||
"type": "boolean", | ||
"description": "If this switch is enabled, TLS connections will be used to connect to MongoDB.", | ||
"default": false, | ||
"order": 5 | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of default null why don't we return string?
Also I don't see a mapping from string or object, how come?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed to String, thanks! Also added String and Symbol.
This mapping needed only for cursor field, since it couldn't be object or array, it isn't present here.