-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev debuglog #4
base: master
Are you sure you want to change the base?
Dev debuglog #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the custom logging logic introduced with $exsaml:logdebug
is for convenience, right?
If this was set to "debug" level by default one would have to change the global setting of an existdb instance and then restart and with this feature it can be switched on and off while the db is running.
But you could argue that changing the level of these log entries should require a restart because it would log sensitive data. What is your though on this?
@@ -123,30 +130,34 @@ declare %private function exsaml:build-saml-authnreq() { | |||
}; | |||
|
|||
declare %private function exsaml:store-authnreqid-as-exsol-user($id as xs:string, $instant as xs:string) { | |||
let $saml-coll-reqid := $exsaml:saml-coll-reqid-base || "/" || $exsaml:saml-coll-reqid-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this value is rather static I would argue it is better to have it built once as declared variable of the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would mean
declare %private variable $exsaml:saml-coll-reqid-base := "/db/apps/existdb-saml";
declare %private variable $exsaml:saml-coll-reqid := $exsaml:saml-coll-reqid-base || "/" || "saml-request-ids";
and that looks dirty to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking more like:
declare %private variable $exsaml:saml-coll-reqid-base := "/db/apps/existdb-saml";
declare %private variable $exsaml:saml-coll-reqid-name := "saml-request-ids";
declare %private variable $exsaml:saml-coll-reqid := $exsaml:saml-coll-reqid-base || "/" || $exsaml:saml-coll-reqid-name;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was arguing that declare
ing a variable value derived from a previously declare
d variable might be wrong. Does the Xquery standard specify that declarations get processed sequentially? Don't think so, but I may be wrong.
Actually, it was introduced to stop people editing the module code, just because they want to see a certain log message. This is controlled by the
|
various improvements: