Package com.mapr.login.client
Class MapRLoginHttpsClient
- java.lang.Object
-
- com.mapr.login.client.MapRLoginHttpsClient
-
- All Implemented Interfaces:
MapRLoginClient
public class MapRLoginHttpsClient extends java.lang.Object implements MapRLoginClient
Author: smarella
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAPR_CLIENT_KERBEROSstatic java.lang.StringNT_GSS_KRB5_PRINCIPALstatic java.lang.StringSPNEGO_OID
-
Constructor Summary
Constructors Constructor Description MapRLoginHttpsClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mapr.fs.proto.Security.TicketAndKeyauthenticateIfNeeded()com.mapr.fs.proto.Security.TicketAndKeyauthenticateIfNeeded(java.lang.String cluster)com.mapr.fs.proto.Security.TicketAndKeygenerateTicket(GenTicketTypeRequest.TicketType ticketType, java.lang.String targetUserName, java.lang.String cluster, java.lang.Long desiredTicketDurInSecs, java.lang.Long renewalTicketDurInSecs, java.util.List<java.lang.Integer> ips, java.util.List<java.lang.Integer> uids, java.util.List<java.lang.Integer> gids, java.lang.String ticketFileLocation)com.mapr.fs.proto.Security.TicketAndKeygetMapRCredentialsViaKerberos(java.lang.Long desiredTicketDurInSecs)com.mapr.fs.proto.Security.TicketAndKeygetMapRCredentialsViaKerberos(java.lang.String cluster, java.lang.Long desiredTicketDurInSecs)com.mapr.fs.proto.Security.TicketAndKeygetMapRCredentialsViaPassword(java.lang.String username, java.lang.String password, java.lang.Long desiredTicketDurInSecs)com.mapr.fs.proto.Security.TicketAndKeygetMapRCredentialsViaPassword(java.lang.String cluster, java.lang.String username, java.lang.String password, java.lang.Long desiredTicketDurInSecs, java.lang.String ticketLocation)booleanisSecurityEnabled()Returns true if the security is enabled for default clusterbooleanisSecurityEnabled(java.lang.String cluster)Returns true if the security is enabled for specified clustervoidlogOut()voidlogOut(java.lang.String cluster)Logout of the specified cluster.voidquietAuthenticateIfNeeded()voidquietAuthenticateIfNeeded(java.lang.String cluster)com.mapr.fs.proto.Security.TicketAndKeyrenew(java.lang.Long desiredTicketDurInSecs)Renew the ticket for default cluster.com.mapr.fs.proto.Security.TicketAndKeyrenew(java.lang.String cluster, java.lang.Long desiredTicketDurInSecs, java.lang.String inTicketFile, java.lang.String ticketLocation)Renew the ticket for the specified cluster.voidsetCheckUGI(boolean b)
-
-
-
Field Detail
-
SPNEGO_OID
public static final java.lang.String SPNEGO_OID
- See Also:
- Constant Field Values
-
NT_GSS_KRB5_PRINCIPAL
public static final java.lang.String NT_GSS_KRB5_PRINCIPAL
- See Also:
- Constant Field Values
-
MAPR_CLIENT_KERBEROS
public static final java.lang.String MAPR_CLIENT_KERBEROS
- See Also:
- Constant Field Values
-
-
Method Detail
-
quietAuthenticateIfNeeded
public void quietAuthenticateIfNeeded()
-
quietAuthenticateIfNeeded
public void quietAuthenticateIfNeeded(java.lang.String cluster)
-
authenticateIfNeeded
public com.mapr.fs.proto.Security.TicketAndKey authenticateIfNeeded() throws MapRLoginException- Specified by:
authenticateIfNeededin interfaceMapRLoginClient- Throws:
MapRLoginException
-
authenticateIfNeeded
public com.mapr.fs.proto.Security.TicketAndKey authenticateIfNeeded(java.lang.String cluster) throws MapRLoginException- Specified by:
authenticateIfNeededin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris nullMapRLoginException
-
isSecurityEnabled
public boolean isSecurityEnabled() throws MapRLoginExceptionReturns true if the security is enabled for default cluster- Specified by:
isSecurityEnabledin interfaceMapRLoginClient- Throws:
MapRLoginException
-
isSecurityEnabled
public boolean isSecurityEnabled(java.lang.String cluster)
Returns true if the security is enabled for specified cluster- Specified by:
isSecurityEnabledin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris null
-
getMapRCredentialsViaPassword
public com.mapr.fs.proto.Security.TicketAndKey getMapRCredentialsViaPassword(java.lang.String username, java.lang.String password, java.lang.Long desiredTicketDurInSecs) throws MapRLoginException- Specified by:
getMapRCredentialsViaPasswordin interfaceMapRLoginClient- Throws:
MapRLoginException
-
getMapRCredentialsViaPassword
public com.mapr.fs.proto.Security.TicketAndKey getMapRCredentialsViaPassword(java.lang.String cluster, java.lang.String username, java.lang.String password, java.lang.Long desiredTicketDurInSecs, java.lang.String ticketLocation) throws MapRLoginException- Specified by:
getMapRCredentialsViaPasswordin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris nullMapRLoginException
-
getMapRCredentialsViaKerberos
public com.mapr.fs.proto.Security.TicketAndKey getMapRCredentialsViaKerberos(java.lang.Long desiredTicketDurInSecs) throws MapRLoginException- Specified by:
getMapRCredentialsViaKerberosin interfaceMapRLoginClient- Throws:
MapRLoginException
-
setCheckUGI
public void setCheckUGI(boolean b)
- Specified by:
setCheckUGIin interfaceMapRLoginClient
-
getMapRCredentialsViaKerberos
public com.mapr.fs.proto.Security.TicketAndKey getMapRCredentialsViaKerberos(java.lang.String cluster, java.lang.Long desiredTicketDurInSecs) throws MapRLoginException- Specified by:
getMapRCredentialsViaKerberosin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris nullMapRLoginException
-
logOut
public void logOut() throws MapRLoginException- Specified by:
logOutin interfaceMapRLoginClient- Throws:
MapRLoginException
-
logOut
public void logOut(java.lang.String cluster) throws MapRLoginExceptionLogout of the specified cluster.- Specified by:
logOutin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris nullMapRLoginException
-
renew
public com.mapr.fs.proto.Security.TicketAndKey renew(java.lang.Long desiredTicketDurInSecs) throws MapRLoginExceptionRenew the ticket for default cluster.- Specified by:
renewin interfaceMapRLoginClient- Throws:
MapRLoginException
-
renew
public com.mapr.fs.proto.Security.TicketAndKey renew(java.lang.String cluster, java.lang.Long desiredTicketDurInSecs, java.lang.String inTicketFile, java.lang.String ticketLocation) throws MapRLoginExceptionRenew the ticket for the specified cluster.- Specified by:
renewin interfaceMapRLoginClient- Throws:
java.lang.NullPointerException- if theclusteris nullMapRLoginException
-
generateTicket
public com.mapr.fs.proto.Security.TicketAndKey generateTicket(GenTicketTypeRequest.TicketType ticketType, java.lang.String targetUserName, java.lang.String cluster, java.lang.Long desiredTicketDurInSecs, java.lang.Long renewalTicketDurInSecs, java.util.List<java.lang.Integer> ips, java.util.List<java.lang.Integer> uids, java.util.List<java.lang.Integer> gids, java.lang.String ticketFileLocation) throws MapRLoginException
- Specified by:
generateTicketin interfaceMapRLoginClient- Throws:
MapRLoginException
-
-