-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add permission #53
base: main
Are you sure you want to change the base?
Conversation
Hi @gluckzhang, I believe you can do some evaluation with this PR. By default permissions evaluation is disabled, consider adding the following to your ...
permission:
enabled: true
... To evaluate the permission possibilities, consider the file: |
Hi @holiiveira, got it, thank you for the PR. I will give it a try later this week. Due to my current workload, I might come back with some questions and comments next week :) Just a quick question first, both the legacy backend and the new Backstage backend can have this permission backend enabled, right? |
Yes, for those who use a new backend, there is nothing to be done, but for those who use a legacy backend, this change will break the plugin, as it is necessary to change the |
I see, thanks! |
Hi @holiiveira, I have gone through the code and tried your PR branch locally. Overall I think it looks pretty good. The code follows Backstage's official tutorial and the permissions cover all the existing APIs. I have a question for now: Do you think we should add After hearing your comments on the question above, and also getting the documentation done, I think we are good to go. It is fine to skip the custom error page for now, as Backstage default alerts work well already. Soon we will enable users to create their own wallets in the plugin (each wallet contains configurable pre-defined filters and maybe some other settings), and then the owner of a wallet should have all the permissions to this wallet. I think after having this feature, we will need to improve the permission setup and have conditional permissions by that time. What do you think? |
As this PR contains some breaking changes, and the documentation is not ready yet, we decided to merge some other PRs first and release a new version. I think we can have this feature after that new release. It is just possible that you may need to pull/rebase the main branch, though there should be no messy conflicts. Thanks and looking forward to your thoughts :) |
Hi @gluckzhang, I think it's interesting to add this, especially because you mentioned that users can create their own wallets. I think it's better to wait for this functionality to be added before we proceed with permissioning, what do you think? |
Yes, it makes lots of sense. I think we can pause this PR and get back to it later when we have the wallet feature. |
hi @gluckzhang @holiiveira thanks for working on this, i think permissions is a pretty important feature, since not everyone is supposed to see orgwide cost data. I understand that this is currently paused right now, but what wallet feature are we waiting for? do we have a estimate of when the wallet feature will be out? |
Hi @nia-potato, yeah, I fully understand. Unfortunately, we don't have an ETA for the wallet feature for now. Quick questions: the permissions defined in this PR are at the plugin level, so a user will either access all the cost reports in InfraWallet, or will have zero access to the data. Does this meet your requirements? Then speaking of the |
hi @gluckzhang no worries on the ETA, i think once the basic permissions are implemented, il see if i can incorporate permissions to the entityCard as well. for now i can just make the infrawallet just show entity cards, but still leave the route to infrawallet main plugin, just dont add it to the sidebar for everyone to see. |
Quality Gate passedIssues Measures |
A new plugin (infrawallet-common) has been created with the aim of adding common features, types and permissions to the infrawallet plugin.
Initially, 5 permissions were created:
To use these permissions, you need to configure permissions in the backend. (ex:
packages/srd/permissonPolicy.ts
):The default behavior if you do not configure any permissions is to allow all access.
BREAKING: This update may break Backstage in cases where the legacy Backstage backend system plugin is used.
What needs to be updated in this case:
Editing a file called
infrawallet.ts
in folderpackages/backend/src/plugins/
with the following content:TODO:
fix: #42