Skip to content

Commit 7761e01

Browse files
incorporate document reviews
1 parent befa732 commit 7761e01

File tree

6 files changed

+837
-52
lines changed

6 files changed

+837
-52
lines changed

THIRD_PARTY_LICENSES.txt

Lines changed: 807 additions & 0 deletions
Large diffs are not rendered by default.

docs/src/main/asciidoc/_configprops.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
|===
55
|Name | Default | Description
66

7-
|spring.cloud.oci.config.profile | `DEFAULT` |
8-
|spring.cloud.oci.config.file | |
9-
|spring.cloud.oci.config.type | |
10-
|spring.cloud.oci.config.userId | |
11-
|spring.cloud.oci.config.tenantId | |
12-
|spring.cloud.oci.config.fingerprint | |
13-
|spring.cloud.oci.config.privateKey | |
14-
|spring.cloud.oci.config.passPhrase | |
15-
|spring.cloud.oci.config.region | |
16-
|spring.cloud.oci.region.static | |
17-
|spring.cloud.oci.compartment.static | |
18-
|spring.cloud.oci.storage.enabled | `true` |
19-
|spring.cloud.oci.notification.enabled | `true` |
20-
|spring.cloud.oci.logging.enabled | `true` |
7+
|spring.cloud.oci.config.profile | `DEFAULT` | Name of the profile in OCI Auth config file
8+
|spring.cloud.oci.config.file | NA | Location of the OCI Auth config file
9+
|spring.cloud.oci.config.type | FILE | Config/Auth type to be used. Allowed values are FILE, SIMPLE, INSTANCE_PRINCIPAL and RESOURCE_PRINCIPAL
10+
|spring.cloud.oci.config.userId | NA | OCID of the user used for creating the API key. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
11+
|spring.cloud.oci.config.tenantId | NA | Tenancy OCID where the API key is created. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
12+
|spring.cloud.oci.config.fingerprint | NA | Fingerprint for the public key that was added to the user mentioned in `spring.cloud.oci.config.userId`. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
13+
|spring.cloud.oci.config.privateKey | NA | Full path and filename of the private key used for generating the `spring.cloud.oci.config.fingerprint`. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
14+
|spring.cloud.oci.config.passPhrase | NA | Passphrase used for `spring.cloud.oci.config.privateKey`, if it is encrypted. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
15+
|spring.cloud.oci.config.region | NA | An OCI region which will be used for Authentication. This is needed only if spring.cloud.oci.config.type is `SIMPLE`
16+
|spring.cloud.oci.region.static | NA | An OCI region which will be used for making API calls. This will take precedence over `spring.cloud.oci.config.region`
17+
|spring.cloud.oci.compartment.static | NA | Default OCI Compartment OCID
18+
|spring.cloud.oci.storage.enabled | `true` | Flag to enable the OCI Spring Cloud Storage module
19+
|spring.cloud.oci.notification.enabled | `true` | Flag to enable the OCI Spring Cloud Notification module
20+
|spring.cloud.oci.logging.enabled | `true` | Flag to enable the OCI Spring Cloud Logging module
2121

2222
|===

docs/src/main/asciidoc/core.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,29 @@ Spring Cloud OCI allows you to authenticate with OCI with various following avai
3131

3232
==== Config File Based Authentication
3333

34-
By default config file based authentication is enabled. There are below optional configuration to choose custom config profile name and config file name.
34+
By default config file based authentication is enabled, to set it explicitly set the property spring.cloud.oci.config.type to `FILE`. There are below optional configuration to choose custom config profile name and config file name.
3535

3636
----
3737
spring.cloud.oci.config.profile = DEFAULT
3838
spring.cloud.oci.config.file = <FILE_PATH>
3939
----
4040

41+
For further details about the Authentication config file refer https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm[SDK and CLI Configuration File]
42+
4143
==== Simple Authentication
4244

43-
Set the config.type to `SIMPLE` and set related required properties as below. All the below properties are mandatory.
45+
Set the property spring.cloud.oci.config.type to `SIMPLE` and add below properties:
4446

4547
----
4648
spring.cloud.oci.config.type = SIMPLE
47-
spring.cloud.oci.config.userId = <USER_ID>
48-
spring.cloud.oci.config.tenantId = <TENANT_ID>
49+
spring.cloud.oci.config.userId = ocid1.user.oc1..<unique_ID>
50+
spring.cloud.oci.config.tenantId = ocid1.tenancy.oc1..<unique_ID>
4951
spring.cloud.oci.config.fingerprint = <FINGERPRINT>
5052
spring.cloud.oci.config.privateKey = <PRIVATE_KEY_FILE_PATH>
5153
spring.cloud.oci.config.passPhrase = <PASS_PHRASE>
5254
spring.cloud.oci.config.region = <REGION>
5355
----
54-
Note: spring.cloud.oci.config.passPhrase is optional
56+
Note: All the above properties are mandatory except spring.cloud.oci.config.passPhrase
5557

5658
==== Instance Principal Configuration
5759

@@ -60,6 +62,7 @@ Set the config.type to `INSTANCE_PRINCIPAL` as below.
6062
----
6163
spring.cloud.oci.config.type = INSTANCE_PRINCIPAL
6264
----
65+
For further details refer https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm[OCI Instance Principal Authentication]
6366

6467
==== Resource Principal Configuration
6568

@@ -69,6 +72,8 @@ Set the config.type to `RESOURCE_PRINCIPAL` as below.
6972
spring.cloud.oci.config.type = RESOURCE_PRINCIPAL
7073
----
7174

75+
For further details refer https://docs.public.oneportal.content.oci.oraclecloud.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal[OCI Resource Principal Authentication]
76+
7277
=== Region Configuration
7378

7479
OCI services are available in different regions. Based on the custom requirements, the user can host the application on different OCI regions. The below configuration allows to set specific region for the entire application.
@@ -77,6 +82,8 @@ OCI services are available in different regions. Based on the custom requirement
7782
spring.cloud.oci.region.static = us-ashburn-1
7883
----
7984

85+
Region value set in the above property takes precedence over the property `spring.cloud.oci.config.region` and `region` from the Authentication config file
86+
8087
=== Compartment Configuration
8188

8289
A compartment is a logical container, to organize and control access to the Oracle Cloud Infrastructure (OCI) Resources (Compute, Storage, Network, Load Balancer, etc) created within that compartment. Below configuration allows you to set default compartment for your application.

docs/src/main/asciidoc/logging.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
=== Using Cloud Logging
3030

3131
The starter automatically configures and registers a `Logging` bean in the Spring application context.
32-
The `Logging` bean (link[Javadoc]) can be used to ingest logs associated with a logId.
32+
The `Logging` bean (link[Javadoc]) can be used to ingest logs associated with a logId set in the property `spring.cloud.oci.logging.logId` in the application configuration file
3333

3434
[source,java]
3535
----

docs/src/main/asciidoc/storage.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[#cloud-storage]
55
== Cloud Storage
66

7-
https://www.oracle.com/in/cloud/storage/[Oracle Cloud Storage] allows storing any types of files in single or multiple regions.
7+
https://www.oracle.com/in/cloud/storage/[Oracle Cloud Storage] allows storing any types of files.
88
A Spring Boot starter is provided to auto-configure the various Storage components.
99

1010
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
@@ -36,7 +36,7 @@ The `Storage` bean (link[Javadoc]) can be used to list/create/update/delete buck
3636
@Autowired
3737
private Storage storage;
3838
39-
public void createFile() {
39+
public void createBucketAndUploadFile() {
4040
Bucket bucket = storage.createBucket("my-bucket")
4141
4242
storage.upload("my-bucket", "my-file.txt", inputStream, StorageObjectMetadata.builder().contentType("text/plain").build());

spring-cloud-oci-autoconfigure/pom.xml

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
5656
<artifactId>spring-boot-autoconfigure-processor</artifactId>
5757
<optional>true</optional>
5858
</dependency>
59-
<dependency>
60-
<groupId>org.springframework.boot</groupId>
61-
<artifactId>spring-boot-starter</artifactId>
62-
</dependency>
6359
<dependency>
6460
<groupId>org.springframework.boot</groupId>
6561
<artifactId>spring-boot-autoconfigure</artifactId>
@@ -69,10 +65,6 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
6965
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
7066
<optional>true</optional>
7167
</dependency>
72-
<dependency>
73-
<groupId>com.oracle.oci.sdk</groupId>
74-
<artifactId>oci-java-sdk-common</artifactId>
75-
</dependency>
7668
<dependency>
7769
<groupId>com.oracle.cloud.spring</groupId>
7870
<artifactId>spring-cloud-oci-core</artifactId>
@@ -92,30 +84,9 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
9284
<artifactId>spring-cloud-oci-logging</artifactId>
9385
<optional>true</optional>
9486
</dependency>
95-
<dependency>
96-
<groupId>com.oracle.oci.sdk</groupId>
97-
<artifactId>oci-java-sdk-ons</artifactId>
98-
</dependency>
99-
<dependency>
100-
<groupId>com.oracle.oci.sdk</groupId>
101-
<artifactId>oci-java-sdk-objectstorage</artifactId>
102-
</dependency>
10387
<dependency>
10488
<groupId>com.oracle.oci.sdk</groupId>
10589
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
10690
</dependency>
107-
<dependency>
108-
<groupId>org.springframework</groupId>
109-
<artifactId>spring-web</artifactId>
110-
<optional>true</optional>
111-
</dependency>
112-
<dependency>
113-
<groupId>org.springframework</groupId>
114-
<artifactId>spring-webmvc</artifactId>
115-
</dependency>
116-
<dependency>
117-
<groupId>javax.servlet</groupId>
118-
<artifactId>javax.servlet-api</artifactId>
119-
</dependency>
12091
</dependencies>
121-
</project>
92+
</project>

0 commit comments

Comments
 (0)