-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add support for sending all credentials to trusted domains #831
Conversation
Codecov Report
@@ Coverage Diff @@
## master #831 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 133 133
Lines 2312 2352 +40
Branches 403 415 +12
=========================================
+ Hits 2312 2352 +40
Continue to review full report at Codecov.
|
The doc isn't specific about this either, other than saying that the protocol is optional, but it does seem reasonable. It'd only be an issue if the user expected it to work over |
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.
Looks good 👍🏻
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.
Overall LGTM. I have a few minor comments.
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.
Nothing to add beyond @noahmulfinger's suggestions. Thanks for digging deep into the weeds and resolving this.
I haven't had a chance to look in depth, but my main concern is whether renaming
I think we could put a getter like: get trustedServers() {
console.log('DEPRECATED: use federatedServers instead');
return this.federatedServers;
} But I don't think we have too b/c it's private and doesn't appear in the docs. If our intent is to keep |
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, Patrick; I don't think that it will break our use of the library.
Co-authored-by: Noah Mulfinger <[email protected]>
…-js into trusted-domains-support
In the process of chasing down a very specific bug in Vector Tile Style Editor for a very specific customer with a very specific security setup we found out that ArcGIS REST JS needs to support sending all credentials to servers defined in the
authorizedCrossOriginDomains
property onportals/self
.The reason for this is that in some high security scenarios organizations ALSO authenticate with BOTH some sort of cookie based auth (PKI/IWA) AND token based auth. In this case the domains that should also get the cookie based auth are defined in the
authorizedCrossOriginDomains
property onportals/self
so we have to request that before trying to federate otherwise getting the server info will fail.@dasa we discussed that a protocol is not strictly required by the UI for this. In this case we treat
secure.esri.com
ashttps://secure.esri.com
to always force HTTPS in these kinds of high security setups. I think you told us the JS API will treat this ashttps://secure.esri.com
ORhttp://secure.esri.com
for purposes of matching. I think we should support HTTPS only in this case. Let me know if you think this is a problem.@noahmulfinger @tomwayson @dbouwman @MikeTschudi this makes a few internal chagnes to
UserSession
:trustedServers
tofederatedServers
so we can have the newtrustedDomains
property and not have it be confusing.getPortal
likegetUser
however this doesn't have any type information because I didn't want to moveIPortal
into common types and make this PR even larger.IAuthenticationManager.getDomainCredentials
which will return the proper value for Fetchcredentials
based on a URL this only needs to be implemented forUserSession
and is used internally byrequest
.portal/self
call which is required.