com.sun.grid.ca

## Interface GridCA

- All Known Implementing Classes:
    GridCAImpl

      public interface GridCA

  This interface defines all methods which can be exeucted on the Grid Certificate Authority.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createDaemon(java.lang.String daemon, java.lang.String user, java.lang.String email)` Create private key and certificate for a sdm daemon.
    `java.security.KeyStore` | `createDaemonKeyStore(java.lang.String daemon)` Get the keystore for a daemon.
    `java.security.KeyStore` | `createKeyStore(java.lang.String username, char[] keystorePassword, char[] privateKeyPassword)` Create a keystore which contains the private key and certificate of an user.
    `java.security.KeyStore` | `createSGEDaemonKeyStore(java.lang.String daemon, char[] keystorePassword, char[] privateKeyPassword)` Get the keystore for an SGE daemon.
    `void` | `createUser(java.lang.String username, java.lang.String email)` Create private key and certificate for a user.
    `void` | `createUser(java.lang.String username, java.lang.String gecos, java.lang.String email)` Deprecated. the gecos field is no longer used, use @{link #createUser(String,String)} instead
    `java.security.cert.X509Certificate` | `getCertificate(java.lang.String username)` Get the X.509 certificate of a user.
    `java.security.cert.X509Certificate` | `getDaemonCertificate(java.lang.String daemon)` Get the X.509 certificate of a daemon.
    `void` | `init(InitCAParameters params)` Initialize the Grid CA
    `void` | `renewCaCertificate(int days)` Renew the certificate of the certificate authority
    `java.security.cert.X509Certificate` | `renewCertificate(java.lang.String username, int days)` Renew the certificate of a user.
    `java.security.cert.X509Certificate` | `renewDaemonCertificate(java.lang.String daemon, int days)` Renew the certificate of a daemon.

- - ### Method Detail

    - #### init

          void init(InitCAParameters params)
             throws GridCAException

      Initialize the Grid CA
      Parameters:
        `params` - parmeters for the CA
      Throws:
        `GridCAException`

    - #### createUser

          void createUser(java.lang.String username,
                          java.lang.String gecos,
                          java.lang.String email)
                   throws GridCAException

      Deprecated. the gecos field is no longer used, use @{link #createUser(String,String)} instead
      Create private key and certificate for a user.
      Parameters:
        `username` - name of the user
        `gecos` - gecos of the user
        `email` - email address of the user
      Throws:
        `GridCAException` - if the creation of the private key or the certificate fails

    - #### createUser

          void createUser(java.lang.String username,
                          java.lang.String email)
                   throws GridCAException

      Create private key and certificate for a user.
      Parameters:
        `username` - name of the user
        `email` - email address of the user
      Throws:
        `GridCAException` - if the creation of the private key or the certificate fails

    - #### getCertificate

          java.security.cert.X509Certificate getCertificate(java.lang.String username)
                                                     throws GridCAException

      Get the X.509 certificate of a user.
      Parameters:
        `username` - name of the user
      Returns:
        X.509 certificate
      Throws:
        `GridCAException` - if the certificate does not exist

    - #### getDaemonCertificate

          java.security.cert.X509Certificate getDaemonCertificate(java.lang.String daemon)
                                                           throws GridCAException

      Get the X.509 certificate of a daemon.
      Parameters:
        `daemon` - common name of the daemon
      Returns:
        X.509 certificate
      Throws:
        `GridCAException` - if the certificate does not exist

    - #### createKeyStore

          java.security.KeyStore createKeyStore(java.lang.String username,
                                                char[] keystorePassword,
                                                char[] privateKeyPassword)
                                         throws GridCAException

      Create a keystore which contains the private key and certificate of an user.
      Parameters:
        `username` - name of the user
        `keystorePassword` - password used to encrypt the keystore
        `privateKeyPassword` - password used to encrypt the key
      Throws:
        `GridCAException` - if the keystore could not be created

    - #### renewCertificate

          java.security.cert.X509Certificate renewCertificate(java.lang.String username,
                                                              int days)
                                                       throws GridCAException

      Renew the certificate of a user.
      Parameters:
        `username` - name of the user
        `days` - validity of the new certificate in days
      Returns:
        the renewed certificate
      Throws:
        `CAException` - if the certificate can not be renewed
        `GridCAException`

    - #### renewDaemonCertificate

          java.security.cert.X509Certificate renewDaemonCertificate(java.lang.String daemon,
                                                                    int days)
                                                             throws GridCAException

      Renew the certificate of a daemon.
      Parameters:
        `daemon` - name of the daemon
        `days` - validity of the new certificate in days
      Returns:
        the renewed certificate
      Throws:
        `GridCAException` - if the certificate can not be renewed

    - #### renewCaCertificate

          void renewCaCertificate(int days)
                           throws GridCAException

      Renew the certificate of the certificate authority
      Parameters:
        `days` - validity of the new certificate in days
      Throws:
        `GridCAException` - if the certificate can not be renewed

    - #### createDaemon

          void createDaemon(java.lang.String daemon,
                            java.lang.String user,
                            java.lang.String email)
                     throws GridCAException

      Create private key and certificate for a sdm daemon.
      Parameters:
        `daemon` - name of the daemon
        `user` - username of the daemon (owner of the process)
        `email` - email address of the process owner
      Throws:
        `GridCAException` - if the create of the daemon failed

    - #### createDaemonKeyStore

          java.security.KeyStore createDaemonKeyStore(java.lang.String daemon)
                                               throws GridCAException

      Get the keystore for a daemon. This method can be used be the installation to create keystore for the daemon of a sdm system.
      Parameters:
        `daemon` - name of the daemon
      Returns:
        the keystore of the daemon
      Throws:
        `GridCAException`

    - #### createSGEDaemonKeyStore

          java.security.KeyStore createSGEDaemonKeyStore(java.lang.String daemon,
                                                         char[] keystorePassword,
                                                         char[] privateKeyPassword)
                                                  throws GridCAException

      Get the keystore for an SGE daemon. This method can be used to create a keystore for the daemon of a SGE system.
      Parameters:
        `daemon` - name of the daemon
        `keystorePassword` - password used to encrypt the keystore
        `privateKeyPassword` - password used to encrypt the key
      Returns:
        the keystore of the daemon
      Throws:
        `GridCAException`