Skip to content

Commit f827fbf

Browse files
authored
Merge pull request #36 from IBM/shacharn-3850-sign-fail
1.0.40 - fixes in private cert
2 parents e175178 + 14e92db commit f827fbf

39 files changed

+365
-664
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ Service name | Imported class name
4444
<dependency>
4545
<groupId>com.ibm.cloud</groupId>
4646
<artifactId>secrets-manager</artifactId>
47-
<version>1.0.39</version>
47+
<version>1.0.40</version>
4848
</dependency>
4949
```
5050

5151
##### Gradle
5252

5353
```gradle
54-
'com.ibm.cloud:secrets-manager:1.0.37'
54+
'com.ibm.cloud:secrets-manager:1.0.40'
5555
```
5656

5757
## Authentication

modules/common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>secrets-manager-sdk</artifactId>
88
<groupId>com.ibm.cloud</groupId>
9-
<version>1.0.39</version>
9+
<version>1.0.40</version>
1010
<relativePath>../..</relativePath>
1111
</parent>
1212

modules/coverage-reports/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>secrets-manager-sdk</artifactId>
55
<groupId>com.ibm.cloud</groupId>
6-
<version>1.0.39</version>
6+
<version>1.0.40</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

modules/secrets-manager/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>secrets-manager-sdk</artifactId>
77
<groupId>com.ibm.cloud</groupId>
8-
<version>1.0.39</version>
8+
<version>1.0.40</version>
99
<relativePath>../..</relativePath>
1010
</parent>
1111

modules/secrets-manager/src/main/java/com/ibm/cloud/secrets_manager_sdk/secrets_manager/v1/SecretsManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.47.1-be944570-20220406-170244
15+
* IBM OpenAPI SDK Code Generator Version: 3.48.0-e80b60a1-20220414-145125
1616
*/
1717

1818
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1;

modules/secrets-manager/src/main/java/com/ibm/cloud/secrets_manager_sdk/secrets_manager/v1/model/CertificateSecretResource.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static class Builder {
6767
private String privateKey;
6868
private String intermediate;
6969
private CertificateValidity validity;
70-
private List<String> altNames;
70+
private Object altNames;
7171

7272
public Builder(SecretResource certificateSecretResource) {
7373
this.name = certificateSecretResource.name;
@@ -121,22 +121,6 @@ public Builder addLabels(String labels) {
121121
return this;
122122
}
123123

124-
/**
125-
* Adds an altNames to altNames.
126-
*
127-
* @param altNames the new altNames
128-
* @return the CertificateSecretResource builder
129-
*/
130-
public Builder addAltNames(String altNames) {
131-
com.ibm.cloud.sdk.core.util.Validator.notNull(altNames,
132-
"altNames cannot be null");
133-
if (this.altNames == null) {
134-
this.altNames = new ArrayList<String>();
135-
}
136-
this.altNames.add(altNames);
137-
return this;
138-
}
139-
140124
/**
141125
* Set the name.
142126
*
@@ -228,12 +212,11 @@ public Builder validity(CertificateValidity validity) {
228212

229213
/**
230214
* Set the altNames.
231-
* Existing altNames will be replaced.
232215
*
233216
* @param altNames the altNames
234217
* @return the CertificateSecretResource builder
235218
*/
236-
public Builder altNames(List<String> altNames) {
219+
public Builder altNames(Object altNames) {
237220
this.altNames = altNames;
238221
return this;
239222
}

modules/secrets-manager/src/main/java/com/ibm/cloud/secrets_manager_sdk/secrets_manager/v1/model/CertificateTemplateConfig.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public class CertificateTemplateConfig extends ConfigElementDefConfig {
2626
* The type of private key to generate for private certificates and the type of key that is expected for submitted
2727
* certificate signing requests (CSRs).
2828
* <p>
29-
* Allowable values are: `rsa`, `ec` and `any`. A value of `any` allow keys of either type and with any bit size. The
30-
* bit size must be greater than 1024 bits for RSA keys.
29+
* Allowable values are: `rsa` and `ec`.
3130
*/
3231
public interface KeyType {
3332
/**
@@ -38,10 +37,6 @@ public interface KeyType {
3837
* ec.
3938
*/
4039
String EC = "ec";
41-
/**
42-
* any.
43-
*/
44-
String ANY = "any";
4540
}
4641

4742

@@ -52,7 +47,7 @@ public static class Builder {
5247
private String certificateAuthority;
5348
private String allowedSecretGroups;
5449
private Object maxTtl;
55-
private String ttl;
50+
private Object ttl;
5651
private Boolean allowLocalhost;
5752
private List<String> allowedDomains;
5853
private Boolean allowedDomainsTemplate;
@@ -416,7 +411,7 @@ public Builder maxTtl(Object maxTtl) {
416411
* @param ttl the ttl
417412
* @return the CertificateTemplateConfig builder
418413
*/
419-
public Builder ttl(String ttl) {
414+
public Builder ttl(Object ttl) {
420415
this.ttl = ttl;
421416
return this;
422417
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
14+
15+
/**
16+
* Certificate templates configuration.
17+
*/
18+
public class CertificateTemplatesConfig extends GetConfigElementsResourcesItem {
19+
20+
}
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2022.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.cloud.secrets_manager_sdk.secrets_manager.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/**
18+
* Certificate templates configuration.
19+
*/
20+
public class CertificateTemplatesConfigItem extends GenericModel {
21+
22+
/**
23+
* The type of configuration. Value options differ depending on the `config_element` property that you want to define.
24+
*/
25+
public interface Type {
26+
/**
27+
* letsencrypt.
28+
*/
29+
String LETSENCRYPT = "letsencrypt";
30+
/**
31+
* letsencrypt-stage.
32+
*/
33+
String LETSENCRYPT_STAGE = "letsencrypt-stage";
34+
/**
35+
* cis.
36+
*/
37+
String CIS = "cis";
38+
/**
39+
* classic_infrastructure.
40+
*/
41+
String CLASSIC_INFRASTRUCTURE = "classic_infrastructure";
42+
/**
43+
* root_certificate_authority.
44+
*/
45+
String ROOT_CERTIFICATE_AUTHORITY = "root_certificate_authority";
46+
/**
47+
* intermediate_certificate_authority.
48+
*/
49+
String INTERMEDIATE_CERTIFICATE_AUTHORITY = "intermediate_certificate_authority";
50+
/**
51+
* certificate_template.
52+
*/
53+
String CERTIFICATE_TEMPLATE = "certificate_template";
54+
}
55+
56+
protected String name;
57+
protected String type;
58+
protected CertificateTemplateConfig config;
59+
60+
/**
61+
* Gets the name.
62+
* <p>
63+
* The human-readable name to assign to your configuration.
64+
*
65+
* @return the name
66+
*/
67+
public String getName() {
68+
return name;
69+
}
70+
71+
/**
72+
* Gets the type.
73+
* <p>
74+
* The type of configuration. Value options differ depending on the `config_element` property that you want to define.
75+
*
76+
* @return the type
77+
*/
78+
public String getType() {
79+
return type;
80+
}
81+
82+
/**
83+
* Gets the config.
84+
* <p>
85+
* Properties that describe a certificate template. You can use a certificate template to control the parameters that
86+
* are applied to your issued private certificates. For more information, see the
87+
* [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-certificate-templates).
88+
*
89+
* @return the config
90+
*/
91+
public CertificateTemplateConfig getConfig() {
92+
return config;
93+
}
94+
}
95+

modules/secrets-manager/src/main/java/com/ibm/cloud/secrets_manager_sdk/secrets_manager/v1/model/ConfigAction.java

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ public interface Format {
3636
* pem.
3737
*/
3838
String PEM = "pem";
39-
/**
40-
* der.
41-
*/
42-
String DER = "der";
4339
/**
4440
* pem_bundle.
4541
*/
@@ -49,14 +45,14 @@ public interface Format {
4945
@SerializedName("common_name")
5046
protected String commonName;
5147
@SerializedName("alt_names")
52-
protected List<String> altNames;
48+
protected String altNames;
5349
@SerializedName("ip_sans")
5450
protected String ipSans;
5551
@SerializedName("uri_sans")
5652
protected String uriSans;
5753
@SerializedName("other_sans")
5854
protected List<String> otherSans;
59-
protected String ttl;
55+
protected Object ttl;
6056
protected String format;
6157
@SerializedName("max_path_length")
6258
protected Long maxPathLength;
@@ -105,7 +101,7 @@ public String commonName() {
105101
*
106102
* @return the altNames
107103
*/
108-
public List<String> altNames() {
104+
public String altNames() {
109105
return altNames;
110106
}
111107

@@ -149,14 +145,14 @@ public List<String> otherSans() {
149145
/**
150146
* Gets the ttl.
151147
* <p>
152-
* The time-to-live (TTL) or lease duration to assign to a private certificate.
148+
* The time-to-live (TTL) to assign to a private certificate.
153149
* <p>
154150
* The value can be supplied as a string representation of a duration in hours, such as `12h`. The value can't exceed
155151
* the `max_ttl` that is defined in the associated certificate template.
156152
*
157153
* @return the ttl
158154
*/
159-
public String ttl() {
155+
public Object ttl() {
160156
return ttl;
161157
}
162158

@@ -233,7 +229,7 @@ public Boolean useCsrValues() {
233229
/**
234230
* Gets the ou.
235231
* <p>
236-
* The Organizational Unit (OU) values to define in the subject field of the resulting CA certificate.
232+
* The Organizational Unit (OU) values to define in the subject field of the resulting certificate.
237233
*
238234
* @return the ou
239235
*/
@@ -244,7 +240,7 @@ public List<String> ou() {
244240
/**
245241
* Gets the organization.
246242
* <p>
247-
* The Organization (O) values to define in the subject field of the resulting CA certificate.
243+
* The Organization (O) values to define in the subject field of the resulting certificate.
248244
*
249245
* @return the organization
250246
*/
@@ -255,7 +251,7 @@ public List<String> organization() {
255251
/**
256252
* Gets the country.
257253
* <p>
258-
* The Country (C) values to define in the subject field of the resulting CA certificate.
254+
* The Country (C) values to define in the subject field of the resulting certificate.
259255
*
260256
* @return the country
261257
*/
@@ -266,7 +262,7 @@ public List<String> country() {
266262
/**
267263
* Gets the locality.
268264
* <p>
269-
* The Locality (L) values to define in the subject field of the resulting CA certificate.
265+
* The Locality (L) values to define in the subject field of the resulting certificate.
270266
*
271267
* @return the locality
272268
*/
@@ -277,7 +273,7 @@ public List<String> locality() {
277273
/**
278274
* Gets the province.
279275
* <p>
280-
* The Province (ST) values to define in the subject field of the resulting CA certificate.
276+
* The Province (ST) values to define in the subject field of the resulting certificate.
281277
*
282278
* @return the province
283279
*/
@@ -288,7 +284,7 @@ public List<String> province() {
288284
/**
289285
* Gets the streetAddress.
290286
* <p>
291-
* The Street Address values in the subject field of the resulting CA certificate.
287+
* The Street Address values in the subject field of the resulting certificate.
292288
*
293289
* @return the streetAddress
294290
*/
@@ -299,7 +295,7 @@ public List<String> streetAddress() {
299295
/**
300296
* Gets the postalCode.
301297
* <p>
302-
* The Postal Code values in the subject field of the resulting CA certificate.
298+
* The Postal Code values in the subject field of the resulting certificate.
303299
*
304300
* @return the postalCode
305301
*/
@@ -310,8 +306,8 @@ public List<String> postalCode() {
310306
/**
311307
* Gets the serialNumber.
312308
* <p>
313-
* The serial number to assign to the generated private certificate. To assign a random serial number, you can omit
314-
* this field.
309+
* The serial number to assign to the generated certificate. To assign a random serial number, you can omit this
310+
* field.
315311
*
316312
* @return the serialNumber
317313
*/

0 commit comments

Comments
 (0)