question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Access is Denied' errors are for the previous page

See original GitHub issue

Apache Airflow version: 1.10.12

Environment:

  • Cloud provider or hardware configuration: Google Cloud Composer (tweaked environment running Airflow RBAC UI)

What happened:

In Airflow RBAC UI, when switching between pages, ‘Access is Denied’ error message actually indicates missing permissions on the previously visited page.

I understand the basic scenario for which this behavior has been designed:

  • I try to go to a page to which I don’t have access, I am redirected to the home page, which shows ‘Access is Denied’, so I conclude that I don’t have access to the page that I tried to open.

But the interactions which end up in showing ‘Access is Denied’ are not always that simple, and this is where it gets confusing to show the message on a different page than the one to which the user had no access:

  • When I’m an Admin and go to List Users, click Edit record on my user, change my role from Admin to Viewer, click Save, I am redirected to the home page, which shows a green ‘Changed Row’ message and a red ‘Access is Denied’.
    • This is a confusing signal. Did the role assignment succeed or not? Which access was denied if I didn’t try to open any page? (I know the messages come from successful user record update and unsuccessful load of List Users page to which I’m redirected after clicking Save - but not every user may realize this.)

Changed Row - Access is Denied

  • When I don’t have can varimport on VariableModelView permission and go to Variables page, choose a file, click Import Variables, I am redirected to the home page, which shows ‘Access is Denied’.

    • How do I know which permissions I was missing? I might think that I didn’t have permission to the file, which is not the case.
  • In Airflow 1.10.10 we’ve also observed a situation in which removing some permissions (from the current user’s role) required for asynchronous work on the homepage, loading the homepage, and going to an unrelated page (like List Roles) resulted in showing a completely unexpected ‘Access is Denied’ message in that unrelated page.

    • This was the most confusing behavior but I’m not able to reproduce it in Airflow 1.10.12. Here, the asynchronous work on one page resulted in accumulating ‘Access is Denied’ message in the background, and showing it on the next page visited, no matter what the next page was.

I guess this behavior may be built deeply into Flask-AppBuilder and hard to change. But it’s still a UX concern for Airflow.

What you expected to happen:

‘Access is Denied’ error should clearly indicate which page or its fragment it refers to.

How to reproduce it:

Follow the setup and steps described in ‘What happened’ section.

+cc @ryanahamilton @k-jakub

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
ashbcommented, Dec 1, 2020

Probably easier. If we weren’t doing a rewrite I have idea how we could do it, but it would involve a large replacement to the flash() guts and FABs permission handling that seems not worth it right now

0reactions
debimishra89commented, Sep 8, 2021

I am too getting access is denied error after login. I am not even able to logout. It throws the same “access denied” issue on the homepage. https://stackoverflow.com/questions/69107102/not-able-to-logout-of-airflow-2-1-1-after-integrating-with-keycloakoauth2

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Ways To Fix “Access Denied On This Server” Error
Fixes For “Access denied on this server” Error · Turn Off VPN · Change the DNS Settings · Disable Proxy · Run Internet...
Read more >
"Access Denied" or other errors when you access or work with ...
Issue 1: I receive an "Access Denied" error message when I try to access or work with files and folders · Press and...
Read more >
Fix “Access Denied, You Don't Have Permission To Access on ...
The “Access Denied” error appears when your browser uses different proxy settings or VPN instead of what's really set on your Windows 10...
Read more >
Access Denied, You don't have permission to access on this ...
To fix the Access Denied error, disable the VPN Software. Try clearing browser data, data for a specific website in Firefox, or reset...
Read more >
5 Ways to Fix the “Access Denied” Error on Windows 11
Access denied error is a common issue on Windows systems and indicates that you don't have permission to view the file or folder....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found