Skip to content
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

Support Client Certificates for Authentication #147

Open
Magnitus- opened this issue Jul 26, 2021 · 0 comments
Open

Support Client Certificates for Authentication #147

Magnitus- opened this issue Jul 26, 2021 · 0 comments
Labels
new-feature Request is a new feature

Comments

@Magnitus-
Copy link

Magnitus- commented Jul 26, 2021

I noticed that mongodb supports certificate authentication for clients. It would be nice to support this in lectern.

This would give a convenient (for those who are comfortable managing tls certificate chains anyways), secure, standard, portable way of managing mongodb client credentials.

Detailed Description

The native mongodb node client supports authenticating with tls certificates:
https://docs.mongodb.com/manual/tutorial/configure-ssl-clients/
http://mongodb.github.io/node-mongodb-native/3.1/tutorials/connect/ssl/

From what I can tell in the code, certificate authentication doesn't appear to be supported in lectern:
https://github.com/overture-stack/lectern/blob/develop/src/config/appConfig.ts#L59

Possible Implementation

Given that mongoose (which I believe you are using) is just an odm abstraction layer on top of the native mongodb client, it stands to reason that it should be supportable.

I'm looking at the doc here and it says you can pass extra options directly to the mongodb native driver: https://mongoosejs.com/docs/connections.html#connection-string-options

You'd want to:

I don't know all the nooks and crannies in your codebase, but I believe that's about it.

@Magnitus- Magnitus- added the new-feature Request is a new feature label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Request is a new feature
Projects
None yet
Development

No branches or pull requests

1 participant