Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#425
Add indexes for the fields
pres_exch_id
andpyop_auth_code
for theauth_session
collection.Those fields are used to look up on at various points in the VCAuthn flow so they should need indexing.
Can look for
get_by_pyop_auth_code
andget_by_pres_exch_id
for usage in the code.This just uses the pymongo
create_index
command in the init_db part of the app, which is called on startup of the oidc-controller.This successfully added indexes on my local where there are around 500 documents already populated.
Note for consideration: do we need to think about index addition for running VCAuthn instances that may(?) have a lot of documents in the collection? Would that need millions? Billions? in order to be concern with an index addition? Not sure if we are close to that in any existing VCAuthn contexts using the
auth_session
collection.Result right after adding and restarting controller: