Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- N/A

## 1.2.37 - 2018-05-03

### Fixed
- `RestClientFactory` now uses the `JerseyClientBuilder` to create clients [issue#56](https://github.com/oracle/oci-java-sdk/issues/56)
- Shaded artifact now includes pom.xml [issue#57](https://github.com/oracle/oci-java-sdk/issues/57)

### Added
- Support for returning names for events in the Audit service
- Support for multiple hostnames per listener in the Load Balancing service

## 1.2.35 - 2018-04-19

### Fixed
Expand All @@ -22,6 +32,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- Support for tagging DbSystem and Database resources in the Database Service
- Support for filtering by `dbSystemId` in `listDbVersions` operation in Database Service
- Support waiting on multiple target states in `Waiter`

## 1.2.34 - 2018-04-05

Expand Down
4 changes: 2 additions & 2 deletions bmc-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
</dependency>
</dependencies>

Expand Down
17 changes: 10 additions & 7 deletions bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,16 @@ public AuditAsyncClient(
com.oracle.bmc.http.signing.SigningStrategy,
com.oracle.bmc.http.signing.RequestSigner>
requestSigners = new java.util.HashMap<>();
for (com.oracle.bmc.http.signing.SigningStrategy s :
com.oracle.bmc.http.signing.SigningStrategy.values()) {
requestSigners.put(
s,
signingStrategyRequestSignerFactories
.get(s)
.createRequestSigner(SERVICE, authenticationDetailsProvider));
if (this.authenticationDetailsProvider
instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) {
for (com.oracle.bmc.http.signing.SigningStrategy s :
com.oracle.bmc.http.signing.SigningStrategy.values()) {
requestSigners.put(
s,
signingStrategyRequestSignerFactories
.get(s)
.createRequestSigner(SERVICE, authenticationDetailsProvider));
}
}
this.client = restClientFactory.create(defaultRequestSigner, requestSigners, configuration);

Expand Down
17 changes: 10 additions & 7 deletions bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,16 @@ public AuditClient(
com.oracle.bmc.http.signing.SigningStrategy,
com.oracle.bmc.http.signing.RequestSigner>
requestSigners = new java.util.HashMap<>();
for (com.oracle.bmc.http.signing.SigningStrategy s :
com.oracle.bmc.http.signing.SigningStrategy.values()) {
requestSigners.put(
s,
signingStrategyRequestSignerFactories
.get(s)
.createRequestSigner(SERVICE, authenticationDetailsProvider));
if (this.authenticationDetailsProvider
instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) {
for (com.oracle.bmc.http.signing.SigningStrategy s :
com.oracle.bmc.http.signing.SigningStrategy.values()) {
requestSigners.put(
s,
signingStrategyRequestSignerFactories
.get(s)
.createRequestSigner(SERVICE, authenticationDetailsProvider));
}
}
this.client = restClientFactory.create(defaultRequestSigner, requestSigners, configuration);

Expand Down
19 changes: 19 additions & 0 deletions bmc-audit/src/main/java/com/oracle/bmc/audit/model/AuditEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ public Builder eventId(String eventId) {
return this;
}

@com.fasterxml.jackson.annotation.JsonProperty("eventName")
private String eventName;

public Builder eventName(String eventName) {
this.eventName = eventName;
this.__explicitlySet__.add("eventName");
return this;
}

@com.fasterxml.jackson.annotation.JsonProperty("eventSource")
private String eventSource;

Expand Down Expand Up @@ -204,6 +213,7 @@ public AuditEvent build() {
tenantId,
compartmentId,
eventId,
eventName,
eventSource,
eventType,
eventTime,
Expand All @@ -230,6 +240,7 @@ public Builder copy(AuditEvent o) {
tenantId(o.getTenantId())
.compartmentId(o.getCompartmentId())
.eventId(o.getEventId())
.eventName(o.getEventName())
.eventSource(o.getEventSource())
.eventType(o.getEventType())
.eventTime(o.getEventTime())
Expand Down Expand Up @@ -277,6 +288,14 @@ public static Builder builder() {
@com.fasterxml.jackson.annotation.JsonProperty("eventId")
String eventId;

/**
* The name of the event.
* Example: `LaunchInstance`
*
**/
@com.fasterxml.jackson.annotation.JsonProperty("eventName")
String eventName;

/**
* The source of the event.
**/
Expand Down
22 changes: 11 additions & 11 deletions bmc-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>oci-java-sdk-bom</artifactId>
Expand All @@ -19,62 +19,62 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<!-- Service modules, alpha sorted -->
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-audit</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-core</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-database</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-dns</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-email</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-filestorage</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-identity</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-loadbalancer</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-objectstorage</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<optional>false</optional>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion bmc-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static RestClient createRestClient(

RestClientFactory restClientFactory =
RestClientFactoryBuilder.builder().clientConfigurator(clientConfigurator).build();
RestClient restClient = restClientFactory.create(requestSigner, null);
RestClient restClient = restClientFactory.create(requestSigner);
restClient.setEndpoint(endpoint);
return restClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*/
package com.oracle.bmc.auth.internal;

import javax.security.auth.RefreshFailedException;
import javax.security.auth.Refreshable;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
Expand All @@ -14,7 +12,12 @@
import com.oracle.bmc.auth.SessionKeySupplier;
import com.oracle.bmc.auth.X509CertificateSupplier;
import com.oracle.bmc.http.ClientConfigurator;
import com.oracle.bmc.http.internal.*;
import com.oracle.bmc.http.internal.ResponseConversionFunctionFactory;
import com.oracle.bmc.http.internal.RestClient;
import com.oracle.bmc.http.internal.RestClientFactory;
import com.oracle.bmc.http.internal.RestClientFactoryBuilder;
import com.oracle.bmc.http.internal.WithHeaders;
import com.oracle.bmc.http.internal.WrappedInvocationBuilder;
import com.oracle.bmc.http.signing.RequestSigner;
import com.oracle.bmc.http.signing.internal.Constants;
import com.oracle.bmc.http.signing.internal.KeySupplier;
Expand All @@ -27,14 +30,20 @@
import lombok.extern.slf4j.Slf4j;

import javax.annotation.concurrent.Immutable;
import javax.security.auth.RefreshFailedException;
import javax.security.auth.Refreshable;
import javax.ws.rs.client.Invocation.Builder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.util.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* This class gets a security token from the auth service by signing the request with a PKI issued leaf certificate,
Expand Down Expand Up @@ -216,7 +225,7 @@ public String get() {
new RequestSignerImpl(keySupplier, signingConfiguration, keyIdSupplier);

RestClientFactory restClientFactory = RestClientFactoryBuilder.builder().build();
RestClient restClient = restClientFactory.create(requestSigner, null);
RestClient restClient = restClientFactory.create(requestSigner);
restClient.setEndpoint(endpoint);
return restClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
import com.oracle.bmc.http.signing.SigningStrategy;
import lombok.Getter;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.JerseyClientBuilder;

import javax.annotation.Nonnull;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import java.util.Collections;
import java.util.Map;

/**
Expand Down Expand Up @@ -66,6 +68,40 @@ public RestClientFactory(@Nonnull ClientConfigurator clientConfigurator) {
this.clientConfigurator = clientConfigurator;
}

/**
* Creates a new client that will use the given
* {@link AuthenticationDetailsProvider}.
*
* @param requestSigner The strategy used to sign requests.
* @return A new RestClient instance.
*
* @deprecated use {@link RestClientFactory#create(RequestSigner, Map)} instead
*/
@Deprecated
public RestClient create(RequestSigner requestSigner) {
return this.create(requestSigner, Collections.<SigningStrategy, RequestSigner>emptyMap());
}

/**
* Creates a new client that will use the given
* {@link AuthenticationDetailsProvider} and {@link ClientConfiguration}.
*
* @param requestSigner The strategy used to sign requests.
* @param configuration
* The client configuration to use, or null for default
* configuration.
* @return A new RestClient instance.
*
* @deprecated use {@link RestClientFactory#create(RequestSigner, Map, ClientConfiguration)} instead
*/
@Deprecated
public RestClient create(RequestSigner requestSigner, ClientConfiguration configuration) {
return this.create(
requestSigner,
Collections.<SigningStrategy, RequestSigner>emptyMap(),
configuration);
}

/**
* Creates a new client that will use the given
* {@link AuthenticationDetailsProvider}.
Expand All @@ -81,6 +117,7 @@ public RestClient create(
Map<SigningStrategy, RequestSigner> requestSigners) {
return this.create(defaultRequestSigner, requestSigners, null);
}

/**
* Creates a new client that will use the given
* {@link AuthenticationDetailsProvider} and {@link ClientConfiguration}.
Expand Down Expand Up @@ -114,7 +151,7 @@ private static Client createClient(
Map<SigningStrategy, RequestSigner> requestSigners,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator) {
ClientBuilder builder = ClientBuilder.newBuilder();
ClientBuilder builder = JerseyClientBuilder.newBuilder();
clientConfigurator.customizeBuilder(builder);

Client client =
Expand Down
4 changes: 2 additions & 2 deletions bmc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.35</version>
<version>1.2.37</version>
</dependency>
</dependencies>

Expand Down
Loading