-
Notifications
You must be signed in to change notification settings - Fork 51
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
Tenant Issuer Config Related Fixes #737
Conversation
shaangill025
commented
Jul 27, 2023
•
edited
Loading
edited
- resolve Configuration to create Tenants with default permission values #607
- resolve Block endorser connection and public DID tenant endpoints if Innkeeper approval is not set #608
- resolve Can't clear the connect_to_endorser and create_public_did fields in config #667
Signed-off-by: Shaanjot Gill <[email protected]>
Signed-off-by: Shaanjot Gill <[email protected]>
Deployment URLs ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible I'm really misunderstanding what the self_issuer_permission
flag is to do here? Or there's some fixes needed.
I think the intention is if self_issuer_permission is true then a tenant that gets created can then connect to the endorser and register a DID without Innkeeper intervention right?
Trying locally on Docker, if I flip self_issuer_permission
to true then create a new Tenant, I'm still seeing the blockage on the issuance switches (see below)
This might just be a minor Tenant UI code bug from a change in this PR, see attached comments in code.
I tried out switching up the conditional there in Vue locally, and the switches appeared as I would expect (again if I'm understanding the permission flag), however when trying to connect to the endorser it's still blocking the user:
If I'm a Tenant with self_issuer_permission
true in my config I should be able to connect to the endorser without Innkeeper intervention right?
Then also, on the PR here (https://pr-737-tenant-ui-dev.apps.silver.devops.gov.bc.ca/innkeeper), where self_issuer_permission
is false. I'm now unable to set the endorser and DID permissions as the Innkeeper.
It's expecting the self_issuer_permission
field to be PUT back with the other config. Maybe this is just a matter of the Tenant UI sending back the current config value for that back in the PUT? If that's the intended flow? I know some other settings PUT commands around ACA-Py don't enforce including every field in the body and then it doesn't change it if it's not supplied (not sure if that's a consistent pattern or not)
I guess it could be nice in the event that self_issuer_permission is ON, that the Innkeeper could revoke that 🤷 So could have a switch for it as well, but that could be a future consideration. Need to not get the 422s for now.
if ( | ||
tenantConfig.value?.connect_to_endorser?.length > 0 || | ||
tenantConfig.value?.self_issuer_permission | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like
if(tenantConfig.value?.self_issuer_permission) {
// Don't need to check, if the tenant is a "self issuer"
return true;
}
if (tenantConfig.value?.connect_to_endorser?.length ) {
.
.
.
if ( | ||
tenantConfig.value?.create_public_did?.length > 0 || | ||
tenantConfig.value?.self_issuer_permission | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like
if(tenantConfig.value?.self_issuer_permission) {
// Don't need to check, if the tenant is a "self issuer"
return true;
}
if (tenantConfig.value?.create_public_did?.length ) {
.
.
.
Aside from comments above also a question probably for @esune for tracking future. Your idea for #607 was the endorser and did registration settings to be pulled as configured defaults (see 607 AC) for the endorser(s) and ledger(s). |
Unblocking PR review as I am out of service until Aug5 in case someone else needs to look at resolution of issues above and merge. |
Talked with @shaangill025 this morning: the |
Signed-off-by: Shaanjot Gill <[email protected]>
…into tenant_config_fix
…config_fix Signed-off-by: Shaanjot Gill <[email protected]>
Signed-off-by: Shaanjot Gill <[email protected]>
Signed-off-by: Shaanjot Gill <[email protected]>
description="True if tenant can make itself issuer, false if only innkeeper can", | ||
default=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better described as True if tenants are automatically allowed to be issuers, False if innkeeper approval is required". Maybe the flag needs to be renamed as well to something more consistent to the behaviour, like
auto_issuer_permission`?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to auto_issuer
to be consistent with other flags in reservation config like auto_approve
.
Signed-off-by: Shaanjot Gill <[email protected]>
@shaangill025 unable to get a token as innkeeper tenant and seeing the following error in acapy logs.
|
@loneil All references to |
Reopened as #748 |