Package org.jets3t.service.security

Examples of org.jets3t.service.security.AWSCredentials


        throw new IllegalArgumentException("AWS " +
            "Secret Access Key must be specified " +
            "as the password of a s3 URL, or by setting the " +
            "fs.s3.awsSecretAccessKey property.");       
      }
      AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretAccessKey);
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
      }
View Full Code Here


        throw new IllegalArgumentException("AWS " +
            "Secret Access Key must be specified " +
            "as the password of a s3 URL, or by setting the " +
            "fs.s3.awsSecretAccessKey property.");       
      }
      AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretAccessKey);
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
      }
View Full Code Here

                S3FileChooser.this.s3Tree.clean();

                try {

                    // create S3Service
                    S3Service s3Service = new RestS3Service(new AWSCredentials(AmazonCredential.getInstance()
                            .getAwsAccessKeyId(), AmazonCredential.getInstance().getAwsSecretAccessKey()));

                    BucketsLoader bucketsLoader = new BucketsLoader(S3FileChooser.this.xbayaGUI,
                            S3FileChooser.this.dialog.getDialog());
                    bucketsLoader.load(s3Service, S3FileChooser.this.s3Tree);
View Full Code Here

     * @return S3Service
     */
    private S3Service getS3Service() {
        S3Service s3Service = null;
        try {
            s3Service = new RestS3Service(new AWSCredentials(AmazonCredential.getInstance().getAwsAccessKeyId(),
                    AmazonCredential.getInstance().getAwsSecretAccessKey()));
        } catch (S3ServiceException s3ex) {
            xBayaEngine.getGUI().getErrorWindow().error(s3ex);
        }
        return s3Service;
View Full Code Here

    this.conf = conf;
   
    S3Credentials s3Credentials = new S3Credentials();
    s3Credentials.initialize(uri, conf);
    try {
      AWSCredentials awsCredentials =
        new AWSCredentials(s3Credentials.getAccessKey(),
            s3Credentials.getSecretAccessKey());
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
View Full Code Here

 
  public void initialize(URI uri, Configuration conf) throws IOException {
    S3Credentials s3Credentials = new S3Credentials();
    s3Credentials.initialize(uri, conf);
    try {
      AWSCredentials awsCredentials =
        new AWSCredentials(s3Credentials.getAccessKey(),
            s3Credentials.getSecretAccessKey());
      this.s3Service = new RestS3Service(awsCredentials);
    } catch (S3ServiceException e) {
      if (e.getCause() instanceof IOException) {
        throw (IOException) e.getCause();
View Full Code Here

       
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, 1);
        Date expiryDate = cal.getTime();

        AWSCredentials awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey);
       
        try {
            /*
             *  Build Gatekeeper request.
             */
 
View Full Code Here

            System.err.println("ERROR: You are using encryption, so the properties file " + propertiesFileName + " must contain the property: password");
            System.exit(2);                       
        }
       
        // Load the AWS credentials from encrypted file.
        AWSCredentials awsCredentials = new AWSCredentials(
            properties.getStringProperty("accesskey", null),
            properties.getStringProperty("secretkey", null));      
       
        if (aclString == null) {
            aclString = properties.getStringProperty("acl", "PRIVATE");
View Full Code Here

            File[] files = cockpitHomeFolder.listFiles();
            for (int i = 0; files != null && i < files.length; i++) {
                File candidateFile = files[i];
                if (candidateFile.getName().endsWith(".enc")) {
                    // Load partial details from credentials file.
                    AWSCredentials credentials = AWSCredentials.load(null, candidateFile);
                    nicknamesTableModel.addAWSCredentialsFile(
                        credentials, candidateFile);
                }
            }
        } catch (Exception e) {
View Full Code Here

     */
    private void loginEvent() {
        try {
            StartupDialog startupDialog = new StartupDialog(ownerFrame, this);
            startupDialog.setVisible(true);           
            AWSCredentials awsCredentials = startupDialog.getAWSCredentials();
            startupDialog.dispose();

            s3ServiceMulti = new S3ServiceMulti(
                new RestS3Service(awsCredentials, APPLICATION_DESCRIPTION, this), this);

View Full Code Here

TOP

Related Classes of org.jets3t.service.security.AWSCredentials

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.