-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Enhance the workflowAssistApps so that third party links can have a check access url #6994
base: main
Are you sure you want to change the base?
Conversation
isAccessible: '=' | ||
}, | ||
link: function(scope, element, attrs) { | ||
$http.get(attrs.gnAppUrlAccessibilityCheck) |
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.
using the HEAD verb would be more appropriate here, otherwise the client may end up downloading a lot of stuff
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 originally used HEAD but then I did not like seen all the error message in the connection logs so I added the option to read the results from the body. If we do a HEAD term then we cannot use the body to check for text like "false, 0,,,"
I'm not sure if it is considered bad practice to check the body text or not? In our organization, we do have a couple API's that simply return an HTTP code 200 with "true" or "false" in the response body.
I can remove the body check and change it to a head request if that is best practice.
… url which can be used to decide if the link should be displayed to the user or not.
a007ea1
to
42dce39
Compare
…into feature/helper_app_check
My feedback after consideration - this approach makes me uncomfortable because it is a baked in SSRF as a feature. If possible I would love to make a request from the security subsystem for a set of "roles", and change the check to a list of spring-security "roles". |
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.
Thanks for fixing the test failure
In GN 4 there is a new page api. |
Hopefully the same logic can be achieved using the page api's These PR's may replace this one.
|
Enhance the workflowAssistApps so that third party links have a check url which can be used to decide if the link should be displayed to the user or not.
We require this option so that we can have it call a check url on our third party app to decide if the user has access to the link that we added. Otherwise some users are clicking on the link just to get an access denied page.
It adds the appAccessCheckUrl and it will follow this rule.
Here is a sample that was used for testing.
It produces the following configuration.
And when viewing a metadata record, selecting
In this case testkey3 is not displayed because www.bad.ca returns an http 500 error.