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

brig update -c fails if project doesn't exist and not logged in as root #1947

Closed
krancour opened this issue May 4, 2022 · 9 comments · Fixed by #1958
Closed

brig update -c fails if project doesn't exist and not logged in as root #1947

krancour opened this issue May 4, 2022 · 9 comments · Fixed by #1958
Assignees
Labels
bug Something isn't working
Milestone

Comments

@krancour
Copy link
Contributor

krancour commented May 4, 2022

With -c set, the project should be created if it doesn't already exist, but instead there is an auth error.

This doesn't occur if you're root.

This may be a similar issue to #1893

cc @AnuragThePathak since you have experience fixing this exact sort of issue.

@krancour krancour added the bug Something isn't working label May 4, 2022
@krancour krancour added this to the v2.6.0 milestone May 4, 2022
@krancour krancour self-assigned this May 4, 2022
@AnuragThePathak
Copy link
Contributor

Oh, the problem seems to exist in many of the actions. Should I try to find all possible places where that may exist and fix them?

@AnuragThePathak
Copy link
Contributor

Btw can I work on this issue? I have end-semester exams throughout the next week, still can try to manage some time. If that doesn't get possible then shall fix it once it's over.

@krancour
Copy link
Contributor Author

krancour commented May 5, 2022

the problem seems to exist in many of the actions. Should I try to find all possible places where that may exist and fix them?

That would be great. To help narrow it down, I think all such places would be project-related.

@AnuragThePathak
Copy link
Contributor

Do I need to check for the READER role before informing that the project doesn't exist? I was thinking of doing that after project creation attempt fails only (i.e. towards the end of the function).
I have observed that if opts.CreateIfNotFound is set to false, user is already being informed about non-existence of project without checking for READER role.

@AnuragThePathak
Copy link
Contributor

By having a look at the Update function, it seemed to me that project-authorization attempt in case of a non-existing project is leading to authorization error. Haven't studied the Authorize function of project authorizer properly yet, as it involves principal and some other stuff which I am not aware at this moment.

@krancour
Copy link
Contributor Author

Forgive me... I haven't looked yet, but is the root cause of the issue not identical to #1893?

@AnuragThePathak
Copy link
Contributor

AnuragThePathak commented May 17, 2022

Oh yeah, most probably they are indeed. I sadly was unnecessarily focusing on the -c flag.
Anyway will fix it within today.

@AnuragThePathak
Copy link
Contributor

Btw I wanted to mention that use of tilt with ctlptl made the hacking experience really awesome.

@krancour
Copy link
Contributor Author

Btw I wanted to mention that use of tilt with ctlptl made the hacking experience really awesome.

So happy to hear that! It's been a major focus lately to try to make it as easy as possible to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants