Ephemeral mappers#449
Open
augustuswm wants to merge 6 commits into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the concept of ephemeral mappers. Ephemeral mappers are mappers that exist only within the runtime memory of the server. Their purpose is to solve a pain point around defining mappers by configuration as opposed to database state.
Main differences:
Generally an application will require at least one mapper rule to bootstrap itself. This is something like an admin group with a user that should be the initial admin. From here, that admin can create groups, and additional dynamic mappers that are stored alongside the data of the application. This bootstrapping mapper is a good use case for an ephemeral mapper. The user defines a configuration for an ephemeral mapper that is passed to the v-api context builder at runtime, and that mapper is installed in memory. An admin can then log in and be granted permissions. On restart, the user can decide if they still want to pass this configuration to the v-api context or not. If they don't then the mapper rule acts as if it never existed.
Because these mappers are ephemeral, we also need to include the ability to record when they are processed. This change adds a log table that records the execution results of mappers so that independent of a mapper being ephemeral or dynamic, we still know when it was used to grant permissions