Interface GhidraServerHandle

  • All Superinterfaces:
    java.rmi.Remote

    public interface GhidraServerHandle
    extends java.rmi.Remote
    GhidraServerHandle provides access to a remote server. This remote interface facilitates user login/authentication, providing a more useful handle to the associated repository server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BIND_NAME
      RMI registry binding name for the supported version of the remote GhidraServerHandle object.
      static java.lang.String BIND_NAME_PREFIX
      RMI registry binding name prefix for all versions of the remote GhidraServerHandle object.
      static int DEFAULT_PORT
      Default RMI base port for Ghidra Server
      static int INTERFACE_VERSION
      The collective interface version for all Ghidra Server remote interfaces.
      static java.lang.String MIN_GHIDRA_VERSION
      Minimum version of Ghidra which utilized the current INTERFACE_VERSION
    • Field Detail

      • INTERFACE_VERSION

        static final int INTERFACE_VERSION
        The collective interface version for all Ghidra Server remote interfaces. If any remote interface is modified, this value should be incremented. Version Change History: 1: Original Version 2: Changed API to support NAT and firewalls 3: Allow user to login with alternate user ID 4: Added additional checkout data and database ID support (4.2) 5: Added support for quick update of checkout file following merged check-in on server, also added alternate authentication via password file (4.4) 6: Refactored BufferFile related classes creating a ManagedBufferFile which supports all the version-control capabilities. (5.2) 7: Added support for SSH authentication callback, anonymous user access (5.4) 8: Added salted local passwords, added LocalIndexedFilesystem V1 with ability to obtain file count (6.1) 9: Added support for transient checkouts (7.2) 10: Added BlockStreamServer (7.4) 11: Revised password hash to SHA-256 (9.0) - version 9.1 switched to using SSL/TLS for RMI registry connection preventing older clients the ability to connect to the server. Remote interface remained unchanged allowing 9.1 clients to connect to 9.0 server.
        See Also:
        Constant Field Values
      • MIN_GHIDRA_VERSION

        static final java.lang.String MIN_GHIDRA_VERSION
        Minimum version of Ghidra which utilized the current INTERFACE_VERSION
        See Also:
        Constant Field Values
      • DEFAULT_PORT

        static final int DEFAULT_PORT
        Default RMI base port for Ghidra Server
        See Also:
        Constant Field Values
      • BIND_NAME_PREFIX

        static final java.lang.String BIND_NAME_PREFIX
        RMI registry binding name prefix for all versions of the remote GhidraServerHandle object.
        See Also:
        Constant Field Values
      • BIND_NAME

        static final java.lang.String BIND_NAME
        RMI registry binding name for the supported version of the remote GhidraServerHandle object.
        See Also:
        Constant Field Values
    • Method Detail

      • getAuthenticationCallbacks

        javax.security.auth.callback.Callback[] getAuthenticationCallbacks()
                                                                    throws java.rmi.RemoteException
        Returns user authentication proxy object.
        Returns:
        authentication callbacks which must be satisfied or null if authentication not required.
        Throws:
        java.rmi.RemoteException
      • getRepositoryServer

        RemoteRepositoryServerHandle getRepositoryServer​(javax.security.auth.Subject user,
                                                         javax.security.auth.callback.Callback[] authCallbacks)
                                                  throws javax.security.auth.login.LoginException,
                                                         java.rmi.RemoteException
        Get a handle to the repository server.
        Parameters:
        user - user subject containing GhidraPrincipal
        authCallbacks - valid authentication callback objects which have been satisfied, or null if server does not require authentication.
        Returns:
        repository server handle.
        Throws:
        javax.security.auth.login.LoginException - if user authentication fails
        java.rmi.RemoteException
        See Also:
        getAuthenticationCallbacks()
      • checkCompatibility

        void checkCompatibility​(int serverInterfaceVersion)
                         throws java.rmi.RemoteException
        Check server interface compatibility
        Parameters:
        serverInterfaceVersion - client/server interface version
        Throws:
        java.rmi.RemoteException
        See Also:
        INTERFACE_VERSION