This repository was archived by the owner on Dec 2, 2020. It is now read-only.
Open
Conversation
Adds a lock expression to the grammar for event expressions and metric expressions - a string that can be appended automatically to an expression prior to parsing that limits the results the expression has access to. This doesn't let us open the Cube server to the public directly, but it does allow us to rewrite the expression in requests through an intermediate service to help prohibit access: expression= sum(nginx_requests.size):nginx_requests.eq(user, 'rocky') limits the sum to the nginx_requests with a 'user' attribute of 'rocky,' assuming, you store that parameter in nginx_requests, of course. So, we can allow the client to send an expression, tack on the lock expression with our web app after authenticating the user, and then forward the request to cube and send back the response to the client while limiting access to the underlying records. Utilizes the core filter parsing already in place.
… from some play-around code I mistakenly pushed up)
|
That seems like a nice addition, but that wouldn't work very well with multiple operations. I like the idea but I'm not sure it's the best way to express constraints, though I have nothing better to offer yet :) |
Author
|
I considered adding additional parameters to the request - so the event and metric getters would then filter based on those parameters. This turned out much cleaner - got some samples of multiple operations that you use that could get my head working through some possibilities? |
|
A meaningless example would be |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hey folks, not sure if there's any interest, but figured I'd pass this along. Adds the ability to limit an expression by appending a filter expression to the end of a metric or event expression.
This allows us to create an interface to the Cube evaluator and still allow the client to provide the initial expression. Our application just needs to append the lock expression before forwarding to our (well secured) evaluator.
Feedback's awesome, this is one of my very few forays into node.