/** * Copyright 2022 Splunk, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"): you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * * Identity * With the Identity service in Splunk Cloud Services, you can authenticate and authorize Splunk Cloud Services users. * * OpenAPI spec version: v2beta1.23 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AddGroupMemberBody, AddGroupRoleBody, AddMemberBody, CreateGroupBody, CreatePrincipalBody, CreateRoleBody, ECJwk, Group, GroupMember, GroupRole, IdentityProviderBody, IdentityProviderConfigBody, Member, Principal, PrincipalPublicKey, PrincipalPublicKeyStatusBody, Role, RolePermission, ValidateInfo } from '../models'; import BaseApiService from "../../../../baseapiservice"; import { IdentityServiceExtensions } from "../../../../service_extensions/identity"; import { RequestStatus } from '../../../../client'; export declare const IDENTITY_SERVICE_PREFIX: string; export declare const IDENTITY_SERVICE_CLUSTER: string; /** * @export */ export declare enum AccessEnum { Write = "write" } /** * Identity * Version: v2beta1.23 * With the Identity service in Splunk Cloud Services, you can authenticate and authorize Splunk Cloud Services users. */ export declare class GeneratedIdentityService extends BaseApiService { getServiceCluster(): string; getServicePrefix(): string; /** * Adds a member to a given group. * @param group The group name. * @param addGroupMemberBody The member to add to a group. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupMember */ addGroupMember: (group: string, addGroupMemberBody: AddGroupMemberBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds a role to a given group. * @param group The group name. * @param addGroupRoleBody The role to add to a group. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupRole */ addGroupRole: (group: string, addGroupRoleBody: AddGroupRoleBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds a member to a given tenant. * @param addMemberBody The member to associate with a tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Member */ addMember: (addMemberBody: AddMemberBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Add service principal public key * @param principal The principal name. * @param eCJwk Service principal public key * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ addPrincipalPublicKey: (principal: string, eCJwk: ECJwk, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds permissions to a role in a given tenant. * @param role The role name. * @param body The permission to add to a role. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return RolePermission */ addRolePermission: (role: string, body: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Creates a new group in a given tenant. * @param createGroupBody The group definition. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Group */ createGroup: (createGroupBody: CreateGroupBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Create an Identity Provider. * @param identityProviderConfigBody The Identity Provider to create. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ createIdentityProvider: (identityProviderConfigBody: IdentityProviderConfigBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Create a new principal * @param createPrincipalBody The new principal to add to the system. * @param args parameters to be sent with the request * @param args.inviteID The invite ID. * @param requestStatusCallback callback function to listen to the status of a request * @return Principal */ createPrincipal: (createPrincipalBody: CreatePrincipalBody, args?: { [key: string]: any; inviteID?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Creates a new authorization role in a given tenant. * @param createRoleBody Role definition * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Role */ createRole: (createRoleBody: CreateRoleBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes a group in a given tenant. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteGroup: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes the Identity Provider. * @param idp The Identity Provider name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteIdentityProvider: (idp: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deletePrincipalPublicKey: (principal: string, keyId: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes a defined role for a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteRole: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given group within a tenant. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Group */ getGroup: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given member within a given group. * @param group The group name. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupMember */ getGroupMember: (group: string, member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given role within a given group. * @param group The group name. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupRole */ getGroupRole: (group: string, role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the Identity Provider for the given tenant. * @param idp The Identity Provider name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ getIdentityProvider: (idp: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a member of a given tenant. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Member */ getMember: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the details of a principal, including its tenant membership. * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Principal */ getPrincipal: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ getPrincipalPublicKey: (principal: string, keyId: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns principal public keys * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKeys */ getPrincipalPublicKeys: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a role for a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Role */ getRole: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets a permission for the specified role. * @param role The role name. * @param permission The permission string. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return RolePermission */ getRolePermission: (role: string, permission: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of the members within a given group. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listGroupMembers: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of the roles that are attached to a group within a given tenant. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listGroupRoles: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * List the groups that exist in a given tenant. * @param args parameters to be sent with the request * @param args.access List only the groups with specified access permission. * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listGroups: (args?: { [key: string]: any; access?: AccessEnum | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the list of Identity Providers for the given tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listIdentityProvider: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of groups that a member belongs to within a tenant. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listMemberGroups: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a set of permissions granted to the member within the tenant. * @param member The member name. * @param args parameters to be sent with the request * @param args.scopeFilter List only the permissions matching the scope filter. * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listMemberPermissions: (member: string, args?: { [key: string]: any; scopeFilter?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a set of roles that a given member holds within the tenant. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listMemberRoles: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of members in a given tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listMembers: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the list of principals that the Identity service knows about. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listPrincipals: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets a list of groups for a role in a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listRoleGroups: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets the permissions for a role in a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listRolePermissions: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns all roles for a given tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listRoles: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes the member from a given group. * @param group The group name. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeGroupMember: (group: string, member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a role from a given group. * @param group The group name. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeGroupRole: (group: string, role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a member from a given tenant * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeMember: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a permission from the role. * @param role The role name. * @param permission The permission string. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeRolePermission: (role: string, permission: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Revoke all existing tokens issued to a principal. Principals can reset their password by visiting https://login.splunk.com/en_us/page/lost_password * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ revokePrincipalAuthTokens: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update the configuration for an Identity Provider. * @param idp The Identity Provider name. * @param identityProviderConfigBody The properties to update the Identity Provider with. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ updateIdentityProvider: (idp: string, identityProviderConfigBody: IdentityProviderConfigBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param principalPublicKeyStatusBody Status of the public key * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ updatePrincipalPublicKey: (principal: string, keyId: string, principalPublicKeyStatusBody: PrincipalPublicKeyStatusBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Validates the access token obtained from the authorization header and returns the principal name and tenant memberships. * @param args parameters to be sent with the request * @param args.include Include additional information to return when validating tenant membership. Valid parameters [tenant, principal] * @param requestStatusCallback callback function to listen to the status of a request * @return ValidateInfo */ validateToken: (args?: { [key: string]: any; include?: string[] | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; } export declare type IdentityService = GeneratedIdentityService & IdentityServiceExtensions; export declare const IdentityService: typeof GeneratedIdentityService;