You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In controlled environments, the application mongodb user has no permissions to create collections or indexes, and in those cases, collection and indexes should be created before hand. I have a requirement to deploy in one of those environments, but the MongoTokenStore is always trying to create an index, thus making the application fail at startup due to permissions denied.
Current Behaviour
When creating a MongoTokenStore via the Builder, it always runs the ensureIndexes() method, which tries to create an index for the tracking token collection. In my use case, this causes an error and the application fails on startup.
Wanted Behaviour
I want to be able to configure in the builder, whether if I want the indexes being created by the application on runtime (as the default behavior it now has) or skip the index creation, as it was created before running the application.
Possible Workarounds
In the MongoTokenStore builder, add a method
public Builder ensureIndexes(boolean ensureIndexes){
...
}
Where we can configure this behavior.
The text was updated successfully, but these errors were encountered:
erikrz
changed the title
MongoTokenStore index should be able to skip ensureIndexes
MongoTokenStore index should be able to skip ensureIndexes()
Jan 20, 2021
Yeah, absolutely!
I'll be glad to contribute. I'm having trouble signing the Contributor License Agreement, though. Visiting the URL in the contribution guidelines redirects me to an unreachable place.
CLAhub (the app for signing that is) has gone down some time ago, but we've only recently noticed this ourselves.
As an effect, you're not able to sign a CLA.
Note that it is not a hard requirement from our end that you sign one.
It purely serves the purpose to give the contributor more rights.
Whether you are okay with providing a PR regardless of the CLA in place is something I cannot decide for you of course.
If not, please let us know. Then we'll nudge you here as soon as we've set up a replacement.
If you are fine without signing it, then I imagine I'll see a PR somewhere in the future.
Enhancement Description
In controlled environments, the application mongodb user has no permissions to create collections or indexes, and in those cases, collection and indexes should be created before hand. I have a requirement to deploy in one of those environments, but the MongoTokenStore is always trying to create an index, thus making the application fail at startup due to permissions denied.
Current Behaviour
When creating a MongoTokenStore via the Builder, it always runs the ensureIndexes() method, which tries to create an index for the tracking token collection. In my use case, this causes an error and the application fails on startup.
Wanted Behaviour
I want to be able to configure in the builder, whether if I want the indexes being created by the application on runtime (as the default behavior it now has) or skip the index creation, as it was created before running the application.
Possible Workarounds
In the MongoTokenStore builder, add a method
Where we can configure this behavior.
The text was updated successfully, but these errors were encountered: