Skip to content

Archive Trac dn airavata credentials

madscatt edited this page Jun 20, 2026 · 1 revision

Dn Airavata Credentials

Legacy Trac archive page imported from dn_airavata_credentials. Source: https://genapp.rocks/wiki/wiki/dn_airavata_credentials. Review age, links, and examples before treating as current.

airavata credentials

  • for same user/ssh key for all resources, one can hard code in airavata-server.properties and restart airavata server
################# ---------- For ssh key pair authentication ------------------- ################
public.ssh.key=/path/to/public_key
private.ssh.key=/path/to/private_key
ssh.keypass=replace_with_key_password
ssh.username=replace_with_username

  • the above does NOT work for resource specific user names as defined in gatewayComputeResourcePreference:loginUserName
  • from Chathuri: "you can run credential store as a TLS enabled thrift service. If you do that, you can use generateAndRegisterSSHKeys() method of airavata API, but it will use generated public key and private key and it will return the public key so you can add it to authorized keys.. I think it will be easier to just execute the java class changing the paths according to your SSH keys"
    • working from my "base" directory /share/airavata/modules/credential-store/credential-store-service/src/test/java
    • yours will likely have a different path prefix than /share... change paths below as appropriate for your installation
    • the java test class can be compiled under the 0.15.0 airavata tree via:
cd /share/airavata/modules/credential-store/credential-store-service/src/test/java
javac -classpath /share/airavata/modules/commons/utils/target/classes:/share/airavata/modules/security/target/classes:/share/airavata/modules/credential-store/credential-store-service/target/classes org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
  • running is another matter
    • download .tar.gz from slf4j under the "base" directory and extract
    • download apache commons-cli-1.2.jar under "base" directory
    • make symlink or copy of airavata-server.properties file to "base" directory
    • make sure airavata.properties have correct information in credential.store.* (and restart airavata after changes)
    • e.g. credential.store.keystore.url=.../airavata.jks
CP=.:/share/airavata/modules/commons/utils/target/classes:/share/airavata/modules/credential-store/credential-store-service/target/classes:/share/airavata/modules/credential-store/credential-store-service/src/test/java/slf4j-1.7.12/slf4j-api-1.7.12.jar:/share/airavata/modules/credential-store/credential-store-service/src/test/java/slf4j-1.7.12/log4j-over-slf4j-1.7.12.jar:/share/airavata/modules/credential-store/credential-store-service/src/test/java/slf4j-1.7.12/slf4j-nop-1.7.12.jar:/share/apps/jdk1.8.0_45/db/lib/derby.jar:/share/apps/jdk1.8.0_45/db/lib/derbyclient.jar:commons-cli-1.2.jar:
java -classpath $CP org.apache.airavata.credential.store.store.impl.db.SSHCredentialTest

example

  • SSHCredentialTest.java definitions
    • note: I added 2 constants and modified the body accordingly
    • sshCredential.setPortalUserName("kenneth"); => sshCredential.setPortalUserName(portalUserName);
    • sshCredential.setPassphrase(""); => sshCredential.setPassphrase(passphrase);
        String jdbcURL        = "jdbc:derby://localhost:51527/experiment_catalog;create=true;user=airavata;password=<redacted>";
        String jdbcDriver     = "org.apache.derby.jdbc.EmbeddedDriver";
        String userName       = "admin";
        String password       = "<redacted-example-password>";
        String gatewayId      = "genAppGateway";
        String privateKeyPath = "/home/ehb/.ssh/airavata_rsa";
        String pubKeyPath     = "/home/ehb/.ssh/airavata_rsa.pub";
        String passphrase     = "airavatatest";
        String portalUserName = "ehb";

Clone this wiki locally