Skip to content

Commit 8d42b29

Browse files
Releasing version 2.66.0
Releasing version 2.66.0
2 parents e40fea6 + 3245777 commit 8d42b29

File tree

994 files changed

+211750
-1444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

994 files changed

+211750
-1444
lines changed

ApacheConnector-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ An example of configuring a proxy can be found [here](https://github.com/oracle/
180180
calling close on the stream object if doing partial read or if not reading at all. If the stream is read completely, then the SDK will try to
181181
auto-close the stream to release the connection from the connection pool.
182182
To manually close the stream in case of partial read of stream/no read. Please call close on the stream.
183-
For example - `GetObjectReponse.getInputStream().close()` or
183+
For example - `GetObjectResponse.getInputStream().close()` or
184184
use try-with-resources. Otherwise, a partial read without closing will lead to the connection not being released from
185185
the pool and results in hanging for an indefinite time.
186186

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## 2.66.0 - 2023-06-27
7+
### Added
8+
- Support for calling Oracle Cloud Infrastructure services in the eu-frankfurt-2 region
9+
- Support for the OS Management Hub service
10+
- Support for changing the key store type, and rotating keys, on Exadata Cloud at Customer in the Database service
11+
- Support for launching VM database systems using Ampere A1 shapes in the Database service
12+
- Support for additional currencies and countries on paid listings in the Marketplace service
13+
- Support for ECPU integration in the License Manager service
14+
- Support for freeform and defined tags on resources in the Generic Artifacts service
15+
- Support for SQL endpoints in the Data Flow service
16+
- Support for setting replication delays on channels in the MySQL Database service
17+
- Support for setting how channels handle replicated tables with no primary key in the MySQL Database service
18+
- Support for SQL Plan Management (SPM) in Database Management service
19+
20+
### Breaking Changes
21+
- Support for retries by default on operations of the Generic Artifacts service
22+
623
## 2.65.1 - 2023-06-20
724
### Added
825
- Support for serial console access in the Database service

bmc-accessgovernancecp/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.oracle.oci.sdk</groupId>
66
<artifactId>oci-java-sdk</artifactId>
7-
<version>2.65.1</version>
7+
<version>2.66.0</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>oci-java-sdk-accessgovernancecp</artifactId>
@@ -15,7 +15,7 @@
1515
<dependency>
1616
<groupId>com.oracle.oci.sdk</groupId>
1717
<artifactId>oci-java-sdk-common</artifactId>
18-
<version>2.65.1</version>
18+
<version>2.66.0</version>
1919
</dependency>
2020
</dependencies>
2121
</project>

bmc-addons/bmc-apache-connector-provider/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.oracle.oci.sdk</groupId>
66
<artifactId>oci-java-sdk-addons</artifactId>
7-
<version>2.65.1</version>
7+
<version>2.66.0</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010

@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.oracle.oci.sdk</groupId>
2020
<artifactId>oci-java-sdk-common</artifactId>
21-
<version>2.65.1</version>
21+
<version>2.66.0</version>
2222
</dependency>
2323
</dependencies>
2424
</project>

bmc-addons/bmc-graalvm-addon/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>oci-java-sdk-addons</artifactId>
66
<groupId>com.oracle.oci.sdk</groupId>
7-
<version>2.65.1</version>
7+
<version>2.66.0</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>oci-java-sdk-addons-graalvm</artifactId>
@@ -132,30 +132,30 @@
132132
<dependency>
133133
<groupId>com.oracle.oci.sdk</groupId>
134134
<artifactId>oci-java-sdk-common</artifactId>
135-
<version>2.65.1</version>
135+
<version>2.66.0</version>
136136
</dependency>
137137
<dependency>
138138
<groupId>com.oracle.oci.sdk</groupId>
139139
<artifactId>oci-java-sdk-objectstorage-extensions</artifactId>
140-
<version>2.65.1</version>
140+
<version>2.66.0</version>
141141
<scope>test</scope>
142142
</dependency>
143143
<dependency>
144144
<groupId>com.oracle.oci.sdk</groupId>
145145
<artifactId>oci-java-sdk-identity</artifactId>
146-
<version>2.65.1</version>
146+
<version>2.66.0</version>
147147
<scope>test</scope>
148148
</dependency>
149149
<dependency>
150150
<groupId>com.oracle.oci.sdk</groupId>
151151
<artifactId>oci-java-sdk-objectstorage-extensions</artifactId>
152-
<version>2.65.1</version>
152+
<version>2.66.0</version>
153153
<scope>test</scope>
154154
</dependency>
155155
<dependency>
156156
<groupId>com.oracle.oci.sdk</groupId>
157157
<artifactId>oci-java-sdk-core</artifactId>
158-
<version>2.65.1</version>
158+
<version>2.66.0</version>
159159
<scope>test</scope>
160160
</dependency>
161161
</dependencies>

bmc-addons/bmc-graalvm-addon/src/main/java/com/oracle/bmc/graalvm/SdkAutomaticFeatureMetadata.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"com.oracle.bmc.opsi.SdkClientsMetadata",
9999
"com.oracle.bmc.optimizer.SdkClientsMetadata",
100100
"com.oracle.bmc.osmanagement.SdkClientsMetadata",
101+
"com.oracle.bmc.osmanagementhub.SdkClientsMetadata",
101102
"com.oracle.bmc.ospgateway.SdkClientsMetadata",
102103
"com.oracle.bmc.osubbillingschedule.SdkClientsMetadata",
103104
"com.oracle.bmc.osuborganizationsubscription.SdkClientsMetadata",

bmc-addons/bmc-oke-workload-identity/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>oci-java-sdk-addons</artifactId>
66
<groupId>com.oracle.oci.sdk</groupId>
7-
<version>2.65.1</version>
7+
<version>2.66.0</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

@@ -38,24 +38,24 @@
3838
<dependency>
3939
<groupId>com.oracle.oci.sdk</groupId>
4040
<artifactId>oci-java-sdk-common</artifactId>
41-
<version>2.65.1</version>
41+
<version>2.66.0</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>com.oracle.oci.sdk</groupId>
4545
<artifactId>oci-java-sdk-core</artifactId>
46-
<version>2.65.1</version>
46+
<version>2.66.0</version>
4747
<scope>test</scope>
4848
</dependency>
4949
<dependency>
5050
<groupId>com.oracle.oci.sdk</groupId>
5151
<artifactId>oci-java-sdk-identity</artifactId>
52-
<version>2.65.1</version>
52+
<version>2.66.0</version>
5353
<scope>test</scope>
5454
</dependency>
5555
<dependency>
5656
<groupId>com.oracle.oci.sdk</groupId>
5757
<artifactId>oci-java-sdk-keymanagement</artifactId>
58-
<version>2.65.1</version>
58+
<version>2.66.0</version>
5959
<scope>test</scope>
6060
</dependency>
6161
<dependency>

bmc-addons/bmc-oke-workload-identity/src/main/java/com/oracle/bmc/auth/okeworkloadidentity/OkeWorkloadIdentityAuthenticationDetailsProvider.java

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
import com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder;
99
import com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider;
1010
import com.oracle.bmc.auth.AuthCachingPolicy;
11+
import com.oracle.bmc.auth.DefaultServiceAccountTokenProvider;
1112
import com.oracle.bmc.auth.ProvidesConfigurableRefresh;
1213
import com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider;
1314
import com.oracle.bmc.auth.RegionProvider;
15+
import com.oracle.bmc.auth.ServiceAccountTokenSupplier;
1416
import com.oracle.bmc.auth.SessionKeySupplier;
17+
import com.oracle.bmc.auth.SuppliedServiceAccountTokenProvider;
1518
import com.oracle.bmc.auth.internal.FederationClient;
1619
import com.oracle.bmc.auth.okeworkloadidentity.internal.OkeTenancyOnlyAuthenticationDetailsProvider;
1720
import com.oracle.bmc.auth.okeworkloadidentity.internal.OkeWorkloadIdentityResourcePrincipalsFederationClient;
@@ -58,12 +61,14 @@ public class OkeWorkloadIdentityAuthenticationDetailsProvider
5861
*/
5962
private final Region region;
6063

61-
/**
62-
* Path for reading Kubernetes service account cert.
63-
*/
64-
private static final String KUBERNETES_SERVICE_ACCOUNT_CERT_PATH =
64+
/** Default path for reading Kubernetes service account cert. */
65+
private static final String DEFAULT_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH =
6566
"/var/run/secrets/kubernetes.io/serviceaccount/ca.crt";
6667

68+
/** Environment variable of the path for Kubernetes service account cert. */
69+
private static final String KUBERNETES_SERVICE_ACCOUNT_CERT_PATH_ENV =
70+
"OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH";
71+
6772
private static final Logger LOG =
6873
org.slf4j.LoggerFactory.getLogger(
6974
OkeWorkloadIdentityResourcePrincipalsFederationClient.class);
@@ -139,6 +144,12 @@ public static class OkeWorkloadIdentityAuthenticationDetailsProviderBuilder
139144
*/
140145
private CircuitBreakerConfiguration circuitBreakerConfig;
141146

147+
private ServiceAccountTokenSupplier serviceAccountTokenSupplier;
148+
149+
public OkeWorkloadIdentityAuthenticationDetailsProviderBuilder() {
150+
this.serviceAccountTokenSupplier = new DefaultServiceAccountTokenProvider();
151+
}
152+
142153
/**
143154
* Configures the tenancyId to use. Used for constructing KeyPairAuthenticationDetailsProvider, it is not used by actual.
144155
* @param tenancyId
@@ -158,6 +169,25 @@ public OkeWorkloadIdentityAuthenticationDetailsProviderBuilder circuitBreakerCon
158169
return this;
159170
}
160171

172+
/** Sets value for the kubernetes service account token */
173+
public OkeWorkloadIdentityAuthenticationDetailsProviderBuilder token(String token) {
174+
this.serviceAccountTokenSupplier = new SuppliedServiceAccountTokenProvider(token);
175+
return this;
176+
}
177+
178+
/** Sets value for the path of kubernetes service account token */
179+
public OkeWorkloadIdentityAuthenticationDetailsProviderBuilder tokenPath(String tokenPath) {
180+
this.serviceAccountTokenSupplier = new DefaultServiceAccountTokenProvider(tokenPath);
181+
return this;
182+
}
183+
184+
/** Sets the kubernetes service account token supplier */
185+
public OkeWorkloadIdentityAuthenticationDetailsProviderBuilder tokenPath(
186+
ServiceAccountTokenSupplier serviceAccountTokenSupplier) {
187+
this.serviceAccountTokenSupplier = serviceAccountTokenSupplier;
188+
return this;
189+
}
190+
161191
/**
162192
* Build a new OkeWorkloadIdentityAuthenticationDetailsProvider.
163193
*
@@ -177,12 +207,14 @@ protected FederationClient createFederationClient(SessionKeySupplier sessionKeyS
177207

178208
// Set ca cert when talking to proxymux using https.
179209
SSLContext sslCtx = null;
180-
if (Files.exists(Paths.get(KUBERNETES_SERVICE_ACCOUNT_CERT_PATH))) {
210+
String kubernetesCaCertPath =
211+
System.getenv(KUBERNETES_SERVICE_ACCOUNT_CERT_PATH_ENV) != null
212+
? System.getenv(KUBERNETES_SERVICE_ACCOUNT_CERT_PATH_ENV)
213+
: DEFAULT_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH;
214+
if (Files.exists(Paths.get(kubernetesCaCertPath))) {
181215
InputStream inputStream = null;
182216
try {
183-
inputStream =
184-
new FileInputStream(
185-
Paths.get(KUBERNETES_SERVICE_ACCOUNT_CERT_PATH).toFile());
217+
inputStream = new FileInputStream(Paths.get(kubernetesCaCertPath).toFile());
186218
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
187219
X509Certificate certificate =
188220
(X509Certificate) certFactory.generateCertificate(inputStream);
@@ -244,6 +276,7 @@ protected FederationClient createFederationClient(SessionKeySupplier sessionKeyS
244276
return new OkeWorkloadIdentityResourcePrincipalsFederationClient(
245277
federationEndpoint,
246278
sessionKeySupplier,
279+
serviceAccountTokenSupplier,
247280
provider,
248281
configurator,
249282
circuitBreakerConfig);

bmc-addons/bmc-oke-workload-identity/src/main/java/com/oracle/bmc/auth/okeworkloadidentity/internal/OkeWorkloadIdentityResourcePrincipalsFederationClient.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import com.fasterxml.jackson.core.JsonProcessingException;
88
import com.fasterxml.jackson.databind.ObjectMapper;
9+
import com.oracle.bmc.auth.ServiceAccountTokenSupplier;
910
import com.oracle.bmc.auth.SessionKeySupplier;
1011
import com.oracle.bmc.auth.internal.AbstractFederationClient;
1112
import com.oracle.bmc.auth.internal.AuthUtils;
@@ -41,13 +42,12 @@ public class OkeWorkloadIdentityResourcePrincipalsFederationClient
4142
private static final Logger LOG =
4243
org.slf4j.LoggerFactory.getLogger(
4344
OkeWorkloadIdentityResourcePrincipalsFederationClient.class);
44-
private final String KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH =
45-
"/var/run/secrets/kubernetes.io/serviceaccount/token";
4645
private final String AUTHORIZATION_HEADER = "Authorization";
4746
private final String OPC_REQUEST_ID_HEADER = "opc-request-id";
4847
private static final String JWT_FORMAT = "Bearer %s";
4948
private final String KUBERNETES_SERVICE_HOST = "KUBERNETES_SERVICE_HOST";
5049
private final int PROXYMUX_SERVER_PORT = 12250;
50+
private final ServiceAccountTokenSupplier serviceAccountTokenSupplier;
5151

5252
/**
5353
* The authentication provider to sign the internal requests.
@@ -64,6 +64,7 @@ public class OkeWorkloadIdentityResourcePrincipalsFederationClient
6464
public OkeWorkloadIdentityResourcePrincipalsFederationClient(
6565
String federationEndpoint,
6666
SessionKeySupplier sessionKeySupplier,
67+
ServiceAccountTokenSupplier serviceAccountTokenSupplier,
6768
OkeTenancyOnlyAuthenticationDetailsProvider okeTenancyOnlyAuthenticationDetailsProvider,
6869
ClientConfigurator clientConfigurator,
6970
CircuitBreakerConfiguration circuitBreakerConfiguration) {
@@ -76,7 +77,7 @@ public OkeWorkloadIdentityResourcePrincipalsFederationClient(
7677
okeTenancyOnlyAuthenticationDetailsProvider,
7778
clientConfigurator,
7879
circuitBreakerConfiguration);
79-
80+
this.serviceAccountTokenSupplier = serviceAccountTokenSupplier;
8081
this.provider = okeTenancyOnlyAuthenticationDetailsProvider;
8182
}
8283

@@ -88,15 +89,18 @@ public OkeWorkloadIdentityResourcePrincipalsFederationClient(
8889
*/
8990
@Override
9091
public String getSecurityToken() {
92+
SecurityTokenAdapter securityTokenAdapter = getSecurityTokenAdapter();
9193
try {
9294
Duration time = Duration.ZERO;
93-
if (getSecurityTokenAdapter().isValid()) {
94-
time = getSecurityTokenAdapter().getTokenValidDuration().dividedBy(2);
95+
if (securityTokenAdapter.isValid()) {
96+
if (securityTokenAdapter.getTokenValidDuration() != null) {
97+
time = securityTokenAdapter.getTokenValidDuration().dividedBy(2);
98+
}
9599
}
96100
return refreshAndGetSecurityTokenIfExpiringWithin(time);
97101
} catch (Exception e) {
98102
LOG.info("Refresh RPST token failed, use cached RPST token.", e);
99-
return getSecurityTokenAdapter().getSecurityToken();
103+
return securityTokenAdapter.getSecurityToken();
100104
}
101105
}
102106

@@ -123,14 +127,7 @@ protected Response makeCallToOke(
123127
protected SecurityTokenAdapter getSecurityTokenFromServer() {
124128
LOG.info("Getting security token from the proxymux server");
125129
//Get service account token.
126-
String token = null;
127-
try {
128-
token =
129-
new String(
130-
Files.readAllBytes(Paths.get(KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH)));
131-
} catch (IOException e) {
132-
throw new IllegalArgumentException("Kubernetesservice account token doesn't exist.", e);
133-
}
130+
String token = serviceAccountTokenSupplier.getServiceAccountToken();
134131

135132
//Generate private/public key pair.
136133
KeyPair keyPair = sessionKeySupplier.getKeyPair();
@@ -182,7 +179,7 @@ protected SecurityTokenAdapter getSecurityTokenFromServer() {
182179
// Remove duplicated "ST$" for the token.
183180
String jwtToken = getOkeResourcePrincipalSessionTokenResponse.getToken().substring(3);
184181

185-
// Create security token based on the reponse.
182+
// Create security token based on the response.
186183
X509FederationClient.SecurityToken securityToken =
187184
new X509FederationClient.SecurityToken(jwtToken);
188185
return new SecurityTokenAdapter(securityToken.getToken(), sessionKeySupplier);

bmc-addons/bmc-resteasy-client-configurator/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk-addons</artifactId>
8-
<version>2.65.1</version>
8+
<version>2.66.0</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.oracle.oci.sdk</groupId>
2727
<artifactId>oci-java-sdk-common</artifactId>
28-
<version>2.65.1</version>
28+
<version>2.66.0</version>
2929
</dependency>
3030
</dependencies>
3131
</project>

0 commit comments

Comments
 (0)