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

Domain Dependency for Tenancy #1789

Merged
merged 1 commit into from
Feb 27, 2022

Conversation

OferLevi85
Copy link
Contributor

Signed-off-by: Ofer Levi [email protected]

assertEquals(dependentDomainList.getNames().size(), 1);
assertEquals(dependentDomainList.getNames().get(0), tenantDomain.toLowerCase());

// Now delete the second resouce group and verify dependency still remains until the admin role is removed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@havetisyan Please note that putTenantResourceGroupRoles and deleteTenantResourceGroupRoles are not symmetrical in their creation and deletion of roles.
An admin role is created in putTenantResourceGroupRoles the first time that a resource group is created for a domain. It isn't removed when deleteTenantResourceGroupRoles is called.
To actually remove the role, we use the "deleteTenant" call.
For domain dependency - I keep the dependency until all roles are removed, including the admin. Let me know if you think the behavior should be different.

@OferLevi85 OferLevi85 force-pushed the domain_dependency_tenancy branch from 2eed716 to 63b7df3 Compare February 23, 2022 16:26
dbService.putDomainDependency(ctx, tenantDomain, provider, auditRef, caller);
}
}
} catch (ResourceException ex) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we still need this try/catch block? I don't see which api is returning the unauthorized exception.

dbService.deleteDomainDependency(ctx, tenantDomain, serviceToDeregister, auditRef, caller);
}
}
} catch (ResourceException ex) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we still need this try/catch block? I don't see which api is returning the unauthorized exception.

@OferLevi85 OferLevi85 force-pushed the domain_dependency_tenancy branch from 63b7df3 to 7f96f6f Compare February 27, 2022 11:36
@havetisyan havetisyan merged commit 9081feb into AthenZ:master Feb 27, 2022
dvirguttman pushed a commit to dvirguttman/athenz that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants