Skip to content

Commit

Permalink
Implement CLOUD_PROVIDER_TOKEN secret type for Java Udx
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Yang committed Jul 16, 2024
1 parent ef78860 commit a128974
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.snowflake.snowpark_java.types;

/** Custom Snowflake class that provides access to accessKeyId & secretAccessKey & token secret object. */
public class CloudProviderToken {
private final String accessKeyId;
private final String secretAccessKey;
private final String token;

public CloudProviderToken(String id, String key, String token) {
this.accessKeyId = id;
this.secretAccessKey = key;
this.token = token;
}

public String getAccessKeyId() {
return accessKeyId;
}

public String getSecretAccessKey() {
return secretAccessKey;
}

public String getToken() {
return token;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ public UsernamePassword getUsernamePassword(String secretName) {
throw new UnsupportedOperationException();
}

/**
* Get the Cloud provider token from the secret. On success, it returns a valid object with access key id,
* secret access key and token.
*
* @param secretName name of the secret object.
*/
public CloudProviderToken getCloudProviderToken(String secretName) {
throw new UnsupportedOperationException();
}
/**
* Get the secret generic string of the secret. On success, it returns a valid token string.
*
Expand Down

0 comments on commit a128974

Please sign in to comment.