Module org.elasticsearch.security
Class ProfileService
java.lang.Object
org.elasticsearch.xpack.security.profile.ProfileService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionProfileService(Settings settings, Clock clock, Client client, SecurityIndexManager profileIndex, ClusterService clusterService, FeatureService featureService, Realms realms) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateProfile(Authentication authentication, ActionListener<Profile> listener) Create a new profile or update an existing profile for the user of the given Authentication.voidgetProfiles(List<String> uids, Set<String> dataKeys, ActionListener<ResultsAndErrors<Profile>> listener) voidgetProfileSubjects(Collection<String> uids, ActionListener<ResultsAndErrors<Map.Entry<String, Subject>>> listener) voidresolveProfileUidsForApiKeys(Collection<ApiKey> apiKeyInfos, ActionListener<Collection<String>> listener) voidsearchProfilesForSubjects(List<Subject> subjects, ActionListener<ProfileService.SubjectSearchResultsAndErrors<Profile>> listener) voidsetEnabled(String uid, boolean enabled, WriteRequest.RefreshPolicy refreshPolicy, ActionListener<AcknowledgedResponse> listener) voidsuggestProfile(SuggestProfilesRequest request, TaskId parentTaskId, ActionListener<SuggestProfilesResponse> listener) voidupdateProfileData(UpdateProfileDataRequest request, ActionListener<AcknowledgedResponse> listener) voidusageStats(ActionListener<Map<String, Object>> listener)
-
Constructor Details
-
ProfileService
public ProfileService(Settings settings, Clock clock, Client client, SecurityIndexManager profileIndex, ClusterService clusterService, FeatureService featureService, Realms realms)
-
-
Method Details
-
getProfiles
public void getProfiles(List<String> uids, Set<String> dataKeys, ActionListener<ResultsAndErrors<Profile>> listener) -
getProfileSubjects
public void getProfileSubjects(Collection<String> uids, ActionListener<ResultsAndErrors<Map.Entry<String, Subject>>> listener) -
activateProfile
Create a new profile or update an existing profile for the user of the given Authentication.- Parameters:
authentication- This is the object from which the profile will be created or updated. It contains information about the username and relevant realms and domain. Note that this authentication object does not belong to the authenticating user because the associated ActivateProfileRequest provides the authentication information in the request body while the authenticating user is the one that has privileges to submit the request.
-
updateProfileData
public void updateProfileData(UpdateProfileDataRequest request, ActionListener<AcknowledgedResponse> listener) -
suggestProfile
public void suggestProfile(SuggestProfilesRequest request, TaskId parentTaskId, ActionListener<SuggestProfilesResponse> listener) -
setEnabled
public void setEnabled(String uid, boolean enabled, WriteRequest.RefreshPolicy refreshPolicy, ActionListener<AcknowledgedResponse> listener) -
resolveProfileUidsForApiKeys
public void resolveProfileUidsForApiKeys(Collection<ApiKey> apiKeyInfos, ActionListener<Collection<String>> listener) -
searchProfilesForSubjects
public void searchProfilesForSubjects(List<Subject> subjects, ActionListener<ProfileService.SubjectSearchResultsAndErrors<Profile>> listener) -
usageStats
-