|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteAgentAuthenticationManager
Manages remote agent authentication.
This manager keeps track of two types of authentication requests: the ones pending approval (not approved) and the ones already approved. ONLY approved authentications are stored persistently.
Authentications are uniquely identified by their UUID, meaning there can never be two approved authentications with the same UUID, or two authentications pending approval with the same UUID. This also means that if an authentication gets approved with UUID associated with some other previously approved authentication, the latter will be replaced with the newly approved authentication.
IP of approved (persisted) authentications can be updated. Wildcard characters (*,?) can be used to match authentications.
Method Summary | |
---|---|
void |
approveAuthentications(java.lang.Iterable<RemoteAgentAuthentication> authentications)
Approve all authentications from the list. |
java.lang.Iterable<RemoteAgentAuthentication> |
getAllAuthentications()
Get all agent authentications known to this Bamboo server. |
RemoteAgentAuthentication |
getAuthentication(java.util.UUID uuid)
Get first remote agent authentication matching the IP and UUID. |
RemoteAgentAuthentication |
getAuthentication(java.util.UUID uuid,
java.lang.String ip)
Get remote agent authentication matching the IP and UUID. |
java.lang.Iterable<RemoteAgentAuthentication> |
getAuthentications(com.google.common.base.Predicate<RemoteAgentAuthentication> filter)
Get authentication filtered by given filter. |
com.atlassian.fage.Pair<RemoteAgentAuthentication,java.lang.Boolean> |
getOrCreatePendingAuthentication(java.util.UUID uuid,
java.lang.String ip)
Create a new pending authentication for given IP address and UUID. |
boolean |
isRemoteAgentAuthenticationEnabled()
Checks whether the remote agent authentication is currently enabled. |
void |
revokeAgentAuthentications(java.lang.Iterable<RemoteAgentAuthentication> authentications)
Revoke approval for given agent authentications. |
void |
setRemoteAgentAuthenticationEnabled(boolean isAuthenticationEnabled)
Sets the remote agent authentication to globally enabled/disabled. |
void |
updateIp(java.util.UUID uuid,
java.lang.String newIp)
Update IP of an approved authentication with given uuid. |
Method Detail |
---|
void setRemoteAgentAuthenticationEnabled(boolean isAuthenticationEnabled) throws java.lang.Exception
isAuthenticationEnabled
- true
if remote agent authentication should be enabled, false
otherwise.
java.lang.Exception
- on any errorboolean isRemoteAgentAuthenticationEnabled()
true
, if remote agent authentication is enabled, false
otherwise@NotNull java.lang.Iterable<RemoteAgentAuthentication> getAllAuthentications()
Get all agent authentications known to this Bamboo server.
The list is sorted first by the authentication status (unapproved first), then by IP address.
@NotNull java.lang.Iterable<RemoteAgentAuthentication> getAuthentications(com.google.common.base.Predicate<RemoteAgentAuthentication> filter)
filter
- predicate to filter authentications
@Nullable RemoteAgentAuthentication getAuthentication(java.util.UUID uuid, java.lang.String ip)
Get remote agent authentication matching the IP and UUID. If not found, null
will be returned.
The returned authentication (if found) will have UUID matching the uuid parameter and IP address either equal to ip parameter or a wildcard mask that matches the ip parameter. Persisted (approved) authentications will be queried in preference to the authentications pending approval.
uuid
- UUIDip
- IP address
null
@Nullable RemoteAgentAuthentication getAuthentication(java.util.UUID uuid)
Get first remote agent authentication matching the IP and UUID. If not found, null
will be returned.
The returned authentication (if found) will have UUID matching the uuid parameter. Persisted (approved) authentications will be queried in preference to the authentications pending approval.
uuid
- UUID
null
@NotNull com.atlassian.fage.Pair<RemoteAgentAuthentication,java.lang.Boolean> getOrCreatePendingAuthentication(@NotNull java.util.UUID uuid, @NotNull java.lang.String ip)
Create a new pending authentication for given IP address and UUID. Or return an existing (approved or not approved) authentication.
If an approved authentication matching given IP and UUID already exists, it will be returned.
If a pending authentication with given UUID exists, it will be replaced by the new authentication with given uuid and ip.
uuid
- UUIDip
- IP address
true
if an existing authentication (pending or approved) with the same UUID and matching IP was
found, and false
otherwise (meaning new authentication created)
java.lang.NullPointerException
- if any of the arguments is null
RemoteAgentAuthentications.matching(java.util.UUID, String)
void approveAuthentications(@NotNull java.lang.Iterable<RemoteAgentAuthentication> authentications)
Approve all authentications from the list.
For each authentication in the list this method will:
authentications
- authentications to approvevoid revokeAgentAuthentications(@NotNull java.lang.Iterable<RemoteAgentAuthentication> authentications)
Revoke approval for given agent authentications.
Not approved authentications will be silently skipped.
authentications
- authentications to disapprovevoid updateIp(@NotNull java.util.UUID uuid, @NotNull java.lang.String newIp)
Update IP of an approved authentication with given uuid.
If no corresponding authentication is found, no action will be taken.
uuid
- UUID of an approved authentication to updatenewIp
- new IP address of the authentication
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |