Save a ServiceProvider.find query during authentication#6091
Save a ServiceProvider.find query during authentication#6091mitchellhenke merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
seems like we could move sp_from_request_issuer_logout to the SAML controller, since it depends on saml_request?
There was a problem hiding this comment.
I was trying to untangle a bit, and wasn't sure where to start safely, but that's a good idea. Made an attempt in e45a5c3
Fwiw, this implementation stems from #3460 and #3461, so my understanding is the only thing depending on sp_from_request_issuer_logout should be the redirect uris in unauthenticated SAML logout contexts
There was a problem hiding this comment.
just to check my understanding, this isn't saving a query, this is just making a method definition more explicit, right?
There was a problem hiding this comment.
Yeah, I got a bit frustrated trying to find where sp_redirect_uris was defined since it's a few layers beneath decorated_session
|
Thought: Could we have a spec which asserts that only X queries (1?) are made during an authentication? |
changelog: Internal, Performance, Re-use existing database query results to avoid duplicative work
66c4043 to
be8a3fa
Compare
one thing I've seen other projects use is hooking into ActiveSupport notifications and tracking queries that way Maybe we combine the raw SQL with something like this https://github.com/pganalyze/pg_query#extracting-tables-from-a-query |
I love this idea. I do have some minor worries about making tests too restrictive, but it'd be cool to explore this and see what's possible. |
e45a5c3 to
3a405b4
Compare
Eventually we'll find them all (followup to #6058, #6061, and #6087)