public interface IamService
Modifier and Type | Method and Description |
---|---|
void |
assignOwnership(org.springframework.web.client.RestTemplate restTemplate,
String clientId,
String iamUrl,
String accountId,
String token)
Assign the ownership of a client.
|
boolean |
checkIam(org.springframework.web.client.RestTemplate restTemplate,
String idpUrl)
Check if a given idp ia an IAM.
|
Map<String,String> |
createClient(org.springframework.web.client.RestTemplate restTemplate,
String iamRegistration,
String uuid,
String userEmail,
String scopes)
Create an IAM client setting the minimal information, in addition to the mail field.
|
void |
deleteAllClients(org.springframework.web.client.RestTemplate restTemplate,
Map<Boolean,Set<Resource>> resources,
Boolean force)
Delete all the clients stored in resources.
|
boolean |
deleteClient(org.springframework.web.client.RestTemplate restTemplate,
String clientId,
String iamUrl,
String token)
Delete a client.
|
String |
getInfoIamClient(org.springframework.web.client.RestTemplate restTemplate,
String clientId,
String iamUrl,
String token)
Get information about a client.
|
String |
getOrchestratorScopes() |
String |
getTokenClientCredentials(org.springframework.web.client.RestTemplate restTemplate,
String iamClientId,
String iamClientSecret,
String iamClientScopes,
String iamTokenEndpoint)
Get a token with client credentials as grant type.
|
WellKnownResponse |
getWellKnown(org.springframework.web.client.RestTemplate restTemplate,
String issuer)
Create a WellKnownResponse object for an IAM idp containing registration_endpoint,
token_endpoint, and scopes_supported.
|
String |
updateClient(org.springframework.web.client.RestTemplate restTemplate,
String clientId,
String iamUrl,
String token,
String jsonUpdated)
Update information about a client.
|
String getOrchestratorScopes()
WellKnownResponse getWellKnown(org.springframework.web.client.RestTemplate restTemplate, String issuer)
restTemplate
- object used to make HTTP requestsissuer
- the identity providerString getTokenClientCredentials(org.springframework.web.client.RestTemplate restTemplate, String iamClientId, String iamClientSecret, String iamClientScopes, String iamTokenEndpoint)
restTemplate
- object used to make HTTP requestsiamClientId
- client_idiamClientSecret
- client_secretiamClientScopes
- scopes to ask in the requestiamTokenEndpoint
- IAM token endpointMap<String,String> createClient(org.springframework.web.client.RestTemplate restTemplate, String iamRegistration, String uuid, String userEmail, String scopes)
restTemplate
- object used to make HTTP requestsiamRegistration
- registration endpoint used to create a clientuuid
- uuid of the deployment, used to set the client nameuserEmail
- user email, used to set the contacts field of the clientscopes
- scopes to set for the new clientboolean deleteClient(org.springframework.web.client.RestTemplate restTemplate, String clientId, String iamUrl, String token)
restTemplate
- object used to make HTTP requestsclientId
- client_idiamUrl
- IAM endpoint to contact for the client deletiontoken
- the registration_access_token used for the deletionvoid deleteAllClients(org.springframework.web.client.RestTemplate restTemplate, Map<Boolean,Set<Resource>> resources, Boolean force)
restTemplate
- object used to make HTTP requestsresources
- resources linked to a given deploymentforce
- flag to force the deletion of a deployment skipping the deletion of IAM clientsvoid assignOwnership(org.springframework.web.client.RestTemplate restTemplate, String clientId, String iamUrl, String accountId, String token)
restTemplate
- object used to make HTTP requestsclientId
- client_idiamUrl
- IAM UrlaccountId
- the id of the owner to be assigned to the clienttoken
- the token with client credentials as grant type using the orchestrator clientboolean checkIam(org.springframework.web.client.RestTemplate restTemplate, String idpUrl)
restTemplate
- object used to make HTTP requestsidpUrl
- Url to be checked if it is an IAM or notString getInfoIamClient(org.springframework.web.client.RestTemplate restTemplate, String clientId, String iamUrl, String token)
restTemplate
- object used to make HTTP requestsclientId
- client_idiamUrl
- IAM Urltoken
- the token to useString updateClient(org.springframework.web.client.RestTemplate restTemplate, String clientId, String iamUrl, String token, String jsonUpdated)
restTemplate
- object used to make HTTP requestsclientId
- client_idiamUrl
- IAM Urltoken
- the token to usejsonUpdated
- the updated json obtained as outputCopyright © 2015–2025 I.N.F.N.. All rights reserved.