Skip to content
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

Issue with sessionduration since latest v3.1. Extension is not working #62

Closed
shubhkb opened this issue Dec 19, 2022 · 8 comments · Fixed by salsify/samltoawsstskeys#2
Closed

Comments

@shubhkb
Copy link

shubhkb commented Dec 19, 2022

There is an issue in latest version 3.1, in script.js file inside onBeforeRequestEvent function sessionduration is not defined because of that it is not working please fix this asap.

let sessionduration = undefined;

image

@prolane
Copy link
Owner

prolane commented Dec 19, 2022

Hi @shubhkb
The line you are referring to is just the declaration of the variable.

Could you post the debug logs here?
See https://github.com/prolane/samltoawsstskeys#faq-frequently-asked-question for help.

@prolane prolane changed the title Latest 3.1 Extension is not working Issue with sessionduration since latest v3.1. Extension is not working Dec 19, 2022
@mimol91
Copy link

mimol91 commented Dec 19, 2022

@prolane
Screen Shot 2022-12-19 at 14 03 59

Screen Shot 2022-12-19 at 14 05 11

@Bobatron
Copy link

I have been having this same issue since last Friday:
image

Whilst this is being fixed, a workaround to getting the credentials file to downloaded is:

  1. View the extension settings via the 'Manage Extension' option
  2. Enable developer mode:
    image
  3. Inspect the service worker view:
    image
  4. From the console, set the value for sessionduration:
    image
  5. Connect to AWS and the credentials file should download as expected

@shubhkb
Copy link
Author

shubhkb commented Dec 19, 2022

Hi @shubhkb The line you are referring to is just the declaration of the variable.

Could you post the debug logs here? See https://github.com/prolane/samltoawsstskeys#faq-frequently-asked-question for help.

image

@prolane prolane reopened this Dec 19, 2022
@prolane
Copy link
Owner

prolane commented Dec 19, 2022

With the refactoring of the code due to Chrome Extension manifest V3 there was indeed a bug introduced related to the sessionduration. I was able to reproduce the issue. You'll encounter this issue when your IDP does not add a Session Duration as one of the SAML Assertion attributes.

This is now fixed with this:

if (typeof sessionduration === 'undefined' || !ApplySessionDuration) {

I'll publish v3.2 tonight in the Chrome web store.

Please let me know if this indeed fixed it for you.

@shubhkb
Copy link
Author

shubhkb commented Dec 20, 2022

sessionduration

sessionduration This variable was not declared in onBeforeRequestEvent function to fix this you need to declare the variable.

@prolane
Copy link
Owner

prolane commented Dec 20, 2022

@shubhkb I agree with you I should declare the variable in a next updated version and I will. For now I don't think it will make any functional difference, does it? The sessionduration variable will implicitly be a global variable due to:

sessionduration = attributes[i].AttributeValue['#text']

If your IDP does not include the SessionDuration Attribute, the sessionduration will be typeof 'undefined' as now checked on that line 143 where the error occurred.

if (typeof sessionduration === 'undefined' || !ApplySessionDuration) {

@prolane
Copy link
Owner

prolane commented Mar 22, 2023

Closing this issue as this has been resolved and no new comments haven been left here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants