Skip to content

Comments

Add HTTP basic auth login.#144

Open
Mekacher-Anis wants to merge 1 commit intografana:mainfrom
Mekacher-Anis:main
Open

Add HTTP basic auth login.#144
Mekacher-Anis wants to merge 1 commit intografana:mainfrom
Mekacher-Anis:main

Conversation

@Mekacher-Anis
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2024

CLA assistant check
All committers have signed the CLA.

Launch chrome and look for main-view element
*/
headers := make(map[string]interface{})
if len(cfg.BasicAuth.Username) != 0 && len(cfg.BasicAuth.Password) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why would anonymous login require authentication?

Copy link
Author

Choose a reason for hiding this comment

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

the anonymous login is for Grafana, meaning that the grafana dashboard (app) itself doesn't require authentication (user account) but it still might be hidden behind a reverse proxy that requires HTTP-Basic auth.
So I see them as two separate authentication requirements.

time.Sleep(2000 * time.Millisecond)

headers := make(map[string]interface{})
if len(cfg.BasicAuth.Username) != 0 && len(cfg.BasicAuth.Password) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for this file, this is for aws login, and doesn't use basic auth, maybe this was not intended?

Copy link
Author

Choose a reason for hiding this comment

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

see the following comment #144 (comment)
but if u think it's not needed then I'll just remove it.


// chromedp.WaitVisible(`//*[@href="login/grafana_com"]/i`, chromedp.BySearch),

headers := make(map[string]interface{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for this file, this is for gcom (grafana cloud) login, and doesn't use basic auth, maybe this was not intended?

Copy link
Author

Choose a reason for hiding this comment

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

see the following comment #144 (comment)
but if u think it's not needed then I'll just remove it.

time.Sleep(time.Duration(cfg.General.PageLoadDelayMS) * time.Millisecond)

headers := make(map[string]interface{})
if len(cfg.BasicAuth.Username) != 0 && len(cfg.BasicAuth.Password) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for this file, this is for local login (via ui interaction), and doesn't use basic auth, maybe this was not intended?

Copy link
Author

Choose a reason for hiding this comment

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

see the following comment #144 (comment)
but if u think it's not needed then I'll just remove it.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Dec 26, 2024
@briangann briangann added no stalebot exempt from stale bot and removed stale labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stalebot exempt from stale bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants