-
Notifications
You must be signed in to change notification settings - Fork 14
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
FOGL-6613: Fledge GUI: Add support for ACL configuration item type #194
Conversation
Signed-off-by: Mohd. Shariq <mohd.shariq@nerdapplabs.com>
Signed-off-by: Mohd. Shariq <mohd.shariq@nerdapplabs.com>
Signed-off-by: Mohd. Shariq <mohd.shariq@nerdapplabs.com>
src/app/components/core/configuration-manager/view-config-item/view-config-item.component.html
Outdated
Show resolved
Hide resolved
src/app/components/core/configuration-manager/view-config-item/view-config-item.component.ts
Outdated
Show resolved
Hide resolved
src/app/components/core/configuration-manager/view-config-item/view-config-item.component.ts
Outdated
Show resolved
Hide resolved
src/app/components/core/configuration-manager/view-config-item/view-config-item.component.ts
Outdated
Show resolved
Hide resolved
src/app/components/core/configuration-manager/view-config-item/view-config-item.component.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Mohd. Shariq <mohd.shariq@nerdapplabs.com>
@mshariq-nerd @praveen-garg As per specs in "Control Dispatcher Service" document we need to call ATTACH PUT /fledge/service/$serviceName/ACL -d '{"acl_name" : "ACL1"}' DETACH DELETE 127.0.0.1:8081/fledge/service/$serviceName/ACL The GUI calls instead, ACL item update for /fledge/$serviceNameSecurity c/c @MarkRiddoch |
@MarkRiddoch Current implementation is as per the JIRA requirement. We are getting ACL as a config item in the security category of the service. In GUI I have added a new configuration type ACL, that is rendered on the configuration page dynamically with other configuration item if any. When we change the config value, updating that using the API endpoint PUT fledge/category/Security, that is true for any configuration item to update its value. Now, If we want to use API of attach/detach ACL with service we have to take it out from the configuration category and put it as a separate item of the service because in the current GUI design calling different api on the category configuration item update, we need to identify the ACL item in the config and separate it out then update it and resync the updated config. Please advise. |
You don't need to take it out. You can very easily identify the ACL's, that is why they are a different type. We will use the ACL mechanism in other places than a configuration category, we must make sure we deal with ACL's in a consistent way, hence the attach and detach calls that need to be made in addition to the update of the configuration category. If you are telling me the GUI code is not up to the job of making two API calls then we will have to move the intelligence into the API rather than have the GUI do it. |
@MarkRiddoch I think Deepanshu doing the stuff that when config item is changed then notify to service? And we are getting ACL type in Security child category for this purpose? This is how we are doing it in GUI right now. |
@mshariq-nerd when we select an ACL in the GUI, say ACL1 then ATTACH PUT /fledge/service/$serviceName/ACL -d '{"acl_name" : "ACL1"}' Wen we select "none" DETACH DELETE 127.0.0.1:8081/fledge/service/$serviceName/ACL Those are the only two APIs for adding/removing an ACL to a service If an ACL is already set, we can only remove it. Then a new one should be attached |
Signed-off-by: Mohd. Shariq <mohd.shariq@nerdapplabs.com>
This looks good to move forward. |
As this base work is required and we are able to display and save ACL type config item; I’m merging this. |
Test against fledge-iot/fledge#738