-
Notifications
You must be signed in to change notification settings - Fork 19
As an Open Forest Admin I'd like to know I can log-in and view admin Pages #1418
Comments
I don't know if this is helpful, but I ran into a similar issue in January. Chrome got very picky about 3rd-party cookies, and if the user only just recently updated, it could be that they just now got hit with it. I know Chrome is also planning to restrict 3rd-party cookies even further. |
@mgwalker just as an additional note this is only affecting production. Staging is working as expected. |
So we THINK this may be related to the chrome issue that started back in Fed 2020. And it looks like the only browser that will work is Firefox. So we are getting the 401 error because of this issue. Per Web/Dev site https://web.dev/samesite-cookies-explained/ Changes to the default behavior without SameSite # • Cookies without a SameSite attribute will be treated as SameSite=Lax. Chrome implements this default behavior as of version 84. Firefox has them available to test as of Firefox 69 and will make them default behaviors in the future. To test these behaviors in Firefox, open about:config and set network.cookie.sameSite.laxByDefault. Edge also plans to change its default behaviors. So looks like WE/Open Forest need to look at how we are implementing cookies. |
FS version issued for Firefox is 78, so looks like it will not work if user has been good about updating their browsers. |
https://www.chromium.org/updates/same-site/test-debug OK I just set my browser to disable samesite I got my content. |
If you disable samesite in chrome you can get the content working again. |
@JonathanLerner54 nice find, that works for me as well. Thanks! |
We still need to fix how ePermits is dealing with cookies on the server side. Eventually, the security gurus will lock out the ability to change this in the browser settings. The site https://www.chromium.org/updates/same-site/test-debug details the parameters we need to set. |
NOTE: @Rebekah-Hernandez and myself tested the functionality of special-uses in both Firefox and Windows Edge. Everything from the submission and acceptance can be completed. Additionally, both admin and basic user access features function as expected. Accordingly, we sent out an email to all MBS Admins informing them of these two additional options for accessing the site, as well as provided them with a detailed description of how to switch the default "sameSite" setting to "disabled" to enable a user to use the site on Chrome as well. |
Some updates, per my understanding (@abdul-fs, @mwreiss please weigh in if any of this is inaccurate):
So I think that's where we are right now. A potential next step might be to delete As an aside, in the future, rather than manually editing dependencies in |
Awesome! Can you temporarily add me as an admin to take a look too? I assume the reason I still get stuck on the While I was logging in, I decided I might as well capture the network traffic just to hand-check the cookie samesite attribute was getting set. I turned off caching and enabled network log preservation in the Chrome dev tools, then watched the network tab. It looks like I'm still getting a cookie without Then later in the request chain, the app attempts a request to All of this is a long-winded way of saying, it's not working for me, but since it IS working for you with default Chrome settings, then I assume the issue must be that I'm not an admin, though I don't know why that would affect the way the cookies are set. |
@mgwalker is this the email address for prod eauth for you? Michael.Walker2@usda.gov . I did an additional test, looks like something was cached on my end so I'm thinking the change didn't work as I'm seeing the "logged-in" screen again. |
Yep, that's me. Rats. I was hoping it was just my end. Ah well... |
@mgwalker yes, you have mbs POC1 role, so you should be in good shape for testing. |
Copying this comment from the PR:I've run the tests locally with the following set of session configurations: As-isapp.use(
session({
name: 'session',
keys: new Keygrip([vcapConstants.PERMIT_SECRET], 'sha256', 'base64'),
maxAge: 3600000, // 1 hour
cookie: {
secure: true,
httpOnly: true,
domain
}
})
); Result: 4 tests related to Christmas trees fail Un-nestedapp.use(
session({
name: 'session',
keys: new Keygrip([vcapConstants.PERMIT_SECRET], 'sha256', 'base64'),
maxAge: 3600000, // 1 hour
secure: true,
httpOnly: true,
domain
})
); Result: 13 tests fail, including one that got a
Un-nested, without
|
@mgwalker makes sense. I'd be willing to move forward with that change to see if it works. |
I just checked staging a not seeing Greg in there either. |
@mgwalker - Hey Greg, I spoke with Mike on this earlier today and he said he thought you were the one working on finishing it up. I was wondering how we were looking. I've gotten several inquiries from the Special-Use admin team and was hoping to give them an update. Thanks for any info! |
Awesome! Thank you for the update. |
I see this in staging now after the last change made. Samesite cookie issue appears to be resolved as I'm able to login, but I dont see any permits like before. We need to make sure this change doesn't get push to PROD before resolving the permits being displayed. @abdul-fs @mgwalker @mtlaney @Dmac26 do you want to do a test permit in staging to see if new ones show up? |
When I try to go to that |
I was able to submit and view applications as a user. I'm having trouble logging in as an Admin though. I think it's a problem with my PW. I'm working on resetting that now. |
This appears to be fixed by #1500. Woohoo! |
This is completed. Thanks team !! |
Notes
It has recently come to our attention that admins for Open Forest are not able to see any admin pages once they log-in. Instead a "blank" page is displayed with only the header and footer being displayed. Additionally a 401 error is thrown in the console and it appears that users are actually logged in but not being routed correctly or not being given the proper permissions.
Tasks
Definition of Done
The text was updated successfully, but these errors were encountered: