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

Login: Fixes Unauthorized message showing when on login page or snapshot page #35311

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Jun 7, 2021

Fixes #33764

@torkelo torkelo requested review from a team, oscarkilhed and kaydelaney and removed request for a team June 7, 2021 09:01
@torkelo torkelo added this to the 8.0.0 milestone Jun 7, 2021
@torkelo torkelo added old backport v8.0.x Mark PR for automatic backport to v8.0.x add to changelog labels Jun 7, 2021
Comment on lines +150 to +152
if (contextSrv.user.orgRole !== '') {
registerEchoBackend(new PerformanceBackend({}));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this fixes the issue @torkelo. The backend still gets registered on the login page and the metrics are sent, yet I don't get why it doesn't throw the Unauthorized.. error now?

Copy link
Member

@dprokop dprokop Jun 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, and the orgRole for myself on the login page is Viewer. Is this ok?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dprokop with anonymous access disabled I do not get this backend registered nor any metrics sent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dprokop do you have anonymous access enabled? if not then that is strange

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, its the anonym access.

@torkelo torkelo merged commit ce513e4 into main Jun 7, 2021
@torkelo torkelo deleted the fix-frontend-metrics-error branch June 7, 2021 09:42
grafanabot pushed a commit that referenced this pull request Jun 7, 2021
dprokop pushed a commit that referenced this pull request Jun 7, 2021
…hot page (#35311) (#35315)

(cherry picked from commit ce513e4)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
@torkelo torkelo added the old backport v7.5.x Mark PR for automatic backport to v7.5.x label Jun 17, 2021
@grafanabot
Copy link
Contributor

The backport to v7.5.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-35311-to-v7.5.x origin/v7.5.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x ce513e4637e2f8fbe56bb8a8c9077bf57a798ca2
# Push it to GitHub
git push --set-upstream origin backport-35311-to-v7.5.x
git switch main
# Remove the local backport branch
git branch -D backport-35311-to-v7.5.x

Then, create a pull request where the base branch is v7.5.x and the compare/head branch is backport-35311-to-v7.5.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend old backport v7.5.x Mark PR for automatic backport to v7.5.x old backport v8.0.x Mark PR for automatic backport to v8.0.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unauthorized message appears before logging into Grafana
3 participants