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

When a script fails EDL auth because of EULA violation, pass JSON payload on to user/script. #248

Open
bbuechler opened this issue Oct 1, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@bbuechler
Copy link
Contributor

This behavior is correct (because its new!) in shared token handling:

https://github.com/asfadmin/thin-egress-app/blob/devel/lambda/app.py#L536-L544

For normal EDL auth, we aren't currently getting the JSON payload.

When a user attempts to log in to an EDL App and reject/avoids accepting the EULA, TEA does not receive the code value necessary to proceed through the rest of the process. Instead of the user being 302 redirected to https://<redirect_uri>?code=<code>, the user is sent to https://<redirect_uri>?error=access_denied .
In that case that originating https://uat.urs.earthdata.nasa.gov/oauth/authorize request has the app_type=401 parameter, 302 redirect is a little more complex: https://<redirect_uri>?error=access_denied&error_msg=App%20EULA%20has%20been%20updated,%20please%20reauthorize%20the%20application%20via%20the%20Earthdata%20Login%20GUI

However, at no point in the process is there a JSON payload, nor is there a resolution_url value.

I'd propose that instead of:

<redirect_uri>?error=access_denied&error_msg=App%20EULA%20has%20been%20updated,%20please%20reauthorize%20the%20application%20via%20the%20Earthdata%20Login%20GUI

the 302 is to:

<redirect_uri>?error=access_denied&reason=EULA%20Acceptance%20Failure&app_type=401&resolution_url=https://urs.earthdata.nasa.gov/approve_app?app_uid=<APP-UID>

... then, downstream apps (like TEA) can reformat that response to a JSON payload.

In terms of TEA though, this is not a tractionable ticket until EDL behavior is changed.

@bbuechler bbuechler changed the title When a script fails EDL auth fails because of EULA violation, pass JSON payload on to user. When a script fails EDL auth because of EULA violation, pass JSON payload on to user/script. Oct 1, 2020
@bbuechler bbuechler reopened this Oct 2, 2020
@bbuechler
Copy link
Contributor Author

Closed the wrong issue

@bbuechler bbuechler reopened this Oct 2, 2020
@bbuechler bbuechler added the enhancement New feature or request label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant