use of io.hops.hopsworks.persistence.entity.user.security.secrets.Secret in project hopsworks by logicalclocks.
the class FeaturestoreSnowflakeConnectorController method createConnector.
public FeaturestoreSnowflakeConnector createConnector(Users user, Featurestore featurestore, FeaturestoreSnowflakeConnectorDTO featurestoreSnowflakeConnectorDTO) throws FeaturestoreException, UserException, ProjectException {
verifyConnectorDTO(featurestoreSnowflakeConnectorDTO);
Secret secret = createSecret(user, featurestore, featurestoreSnowflakeConnectorDTO);
FeaturestoreSnowflakeConnector snowflakeConnector = new FeaturestoreSnowflakeConnector();
setConnector(snowflakeConnector, secret, featurestoreSnowflakeConnectorDTO);
return snowflakeConnector;
}
use of io.hops.hopsworks.persistence.entity.user.security.secrets.Secret in project hopsworks by logicalclocks.
the class FeaturestoreADLSConnectorController method createADLConnector.
public FeaturestoreADLSConnector createADLConnector(Users user, Project project, Featurestore featurestore, FeaturestoreADLSConnectorDTO adlConnectorDTO) throws FeaturestoreException, ProjectException, UserException {
verifyConnectorDTO(adlConnectorDTO);
String secretName = storageConnectorUtil.createSecretName(featurestore.getId(), adlConnectorDTO.getName(), adlConnectorDTO.getStorageConnectorType());
Secret secret = storageConnectorUtil.createProjectSecret(user, secretName, featurestore, adlConnectorDTO.getServiceCredential());
FeaturestoreADLSConnector adlConnector = new FeaturestoreADLSConnector();
adlConnector.setGeneration(adlConnectorDTO.getGeneration());
adlConnector.setDirectoryId(adlConnectorDTO.getDirectoryId());
adlConnector.setApplicationId(adlConnectorDTO.getApplicationId());
adlConnector.setServiceCredentialSecret(secret);
adlConnector.setAccountName(adlConnectorDTO.getAccountName());
adlConnector.setContainerName(adlConnectorDTO.getContainerName());
return adlConnector;
}
Aggregations