1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.devops.aws;
17
18 import static org.kuali.common.aws.model.ImmutableAWSCredentials.builder;
19
20 import org.kuali.common.aws.model.ImmutableAWSCredentials;
21
22 import com.amazonaws.auth.AWSCredentials;
23
24 public enum EncryptedAWSCredentials implements AWSCredentials {
25
26 ENCRYPTED_AWS_CREDENTIALS_FOUNDATION(foundation()),
27 ENCRYPTED_AWS_CREDENTIALS_STUDENT(student()),
28 ENCRYPTED_AWS_CREDENTIALS_RICE(rice()),
29 ENCRYPTED_AWS_CREDENTIALS_OLE(ole());
30
31 private final ImmutableAWSCredentials credentials;
32
33 private EncryptedAWSCredentials(ImmutableAWSCredentials credentials) {
34 this.credentials = credentials;
35 }
36
37 @Override
38 public String getAWSAccessKeyId() {
39 return credentials.getAccessKey();
40 }
41
42 @Override
43 public String getAWSSecretKey() {
44 return credentials.getSecretKey();
45 }
46
47 private static ImmutableAWSCredentials foundation() {
48 ImmutableAWSCredentials.Builder builder = builder();
49 builder.withAccessKey("U2FsdGVkX1+8Ztcpl1oE1zvItuWZ+U/B1m1Y5ZfnPL1/RL3ytfTW0GPQ0T2I6f3x");
50 builder.withSecretKey("U2FsdGVkX19iFvmWrQbvBA+aoUjCW37k8hFzcRrDzjc6KDOfEYUd7m8/nyvy/YBZghfgT88GJhlQVk4aD02eWg==");
51 return builder.build();
52 }
53
54 private static ImmutableAWSCredentials student() {
55 ImmutableAWSCredentials.Builder builder = builder();
56 builder.withAccessKey("U2FsdGVkX19hBXKp9N3JwJMV3n7AMldCEv3BMRKVngUNmsfIk7QfRRxgJ7bSnX1O");
57 builder.withSecretKey("U2FsdGVkX18dh07mozYEQfy5uzzLZ2gEf8hWlkSViADnBBfsgeHUd3as46GSFGr/z3UKbaYDC6UR/kaK44a14g==");
58 return builder.build();
59 }
60
61 private static ImmutableAWSCredentials rice() {
62 ImmutableAWSCredentials.Builder builder = builder();
63 builder.withAccessKey("U2FsdGVkX19rqcUXCR56ecKvRbotNWUDIjItUkNCSm3nbeW09G/26j/KtajdzdZr");
64 builder.withSecretKey("U2FsdGVkX184pbCFaZNEuXKKqaNcRgwCrdyWLvcaXKcQtrh6WdGGk+7TTlFnw9+a75NcHL+cLMl/XZiq5t1erw==");
65 return builder.build();
66 }
67
68 private static ImmutableAWSCredentials ole() {
69 ImmutableAWSCredentials.Builder builder = builder();
70 builder.withAccessKey("U2FsdGVkX1++jaZ6LfP3GjJlj+UUUZIQ+2/xOVSrivUUQ6AxM3XPcEC1lECkh7zv");
71 builder.withSecretKey("U2FsdGVkX196mJBHpZOJKOYxd9fPupAzv9Vf6b9BRHk+IgXKUMQKjwrAUOlFl/WJlPLeotD5QndCbhwJmgNflw==");
72 return builder.build();
73 }
74
75 }