@origincloud/iam 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,9 +33,9 @@ export declare class ServiceAccountClient {
|
|
|
33
33
|
*/
|
|
34
34
|
allServiceAccounts(request: ListServiceAccountsRequest, options?: CallOptions): AsyncGenerator<ServiceAccount, void, undefined>;
|
|
35
35
|
/**
|
|
36
|
-
* Creates a service account and
|
|
37
|
-
* only place the secret is ever shown: store
|
|
38
|
-
* `iam.service_account.create` on the organization.
|
|
36
|
+
* Creates a service account and, for an `EXTERNAL` one, its client
|
|
37
|
+
* secret. The response is the only place the secret is ever shown: store
|
|
38
|
+
* it now. Needs `iam.service_account.create` on the organization.
|
|
39
39
|
*/
|
|
40
40
|
createServiceAccount(request: CreateServiceAccountRequest, options?: CallOptions): Promise<ServiceAccount>;
|
|
41
41
|
/**
|
|
@@ -59,12 +59,15 @@ export interface ServiceAccount {
|
|
|
59
59
|
* `serviceAccount:{service_account}`.
|
|
60
60
|
*/
|
|
61
61
|
member?: string;
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* The OAuth 2.0 client id it authenticates with; empty for a `WORKLOAD`
|
|
64
|
+
* service account.
|
|
65
|
+
*/
|
|
63
66
|
clientId?: string;
|
|
64
67
|
/**
|
|
65
68
|
* The OAuth 2.0 client secret it authenticates with. Set only in the
|
|
66
|
-
* response that created
|
|
67
|
-
* it can't be read again.
|
|
69
|
+
* response that created an `EXTERNAL` service account, and empty
|
|
70
|
+
* everywhere else: it can't be read again.
|
|
68
71
|
*/
|
|
69
72
|
clientSecret?: string;
|
|
70
73
|
/** Where the service account is in its lifecycle. */
|
|
@@ -78,7 +81,38 @@ export interface ServiceAccount {
|
|
|
78
81
|
createTime?: string;
|
|
79
82
|
/** When the service account was deleted; unset while it is active. */
|
|
80
83
|
deleteTime?: string;
|
|
84
|
+
/**
|
|
85
|
+
* How the service account authenticates; `EXTERNAL` when the create
|
|
86
|
+
* leaves it unset.
|
|
87
|
+
*/
|
|
88
|
+
type?: ServiceAccount_Type;
|
|
81
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* How the service account authenticates. Set when it is created; it
|
|
92
|
+
* never changes.
|
|
93
|
+
*/
|
|
94
|
+
export declare const ServiceAccount_Type: {
|
|
95
|
+
/**
|
|
96
|
+
* Not set. A create that leaves it unset creates an `EXTERNAL` service
|
|
97
|
+
* account.
|
|
98
|
+
*/
|
|
99
|
+
readonly TYPE_UNSPECIFIED: "TYPE_UNSPECIFIED";
|
|
100
|
+
/**
|
|
101
|
+
* Authenticates with an OAuth 2.0 client id and secret, for software
|
|
102
|
+
* outside Origin Cloud such as a CI pipeline.
|
|
103
|
+
*/
|
|
104
|
+
readonly EXTERNAL: "EXTERNAL";
|
|
105
|
+
/**
|
|
106
|
+
* Has no client id or secret and can't be given one: no credential of
|
|
107
|
+
* its own authenticates as it, wherever it was copied to.
|
|
108
|
+
*/
|
|
109
|
+
readonly WORKLOAD: "WORKLOAD";
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* How the service account authenticates. Set when it is created; it
|
|
113
|
+
* never changes.
|
|
114
|
+
*/
|
|
115
|
+
export type ServiceAccount_Type = (typeof ServiceAccount_Type)[keyof typeof ServiceAccount_Type];
|
|
82
116
|
/** Where the service account is in its lifecycle. */
|
|
83
117
|
export declare const ServiceAccount_State: {
|
|
84
118
|
/** Not set. */
|
|
@@ -126,7 +160,7 @@ export interface CreateServiceAccountRequest {
|
|
|
126
160
|
* `organizations/{organization}`.
|
|
127
161
|
*/
|
|
128
162
|
parent?: string;
|
|
129
|
-
/** The service account to create: its `displayName`. */
|
|
163
|
+
/** The service account to create: its `displayName` and `type`. */
|
|
130
164
|
serviceAccount?: ServiceAccount;
|
|
131
165
|
/**
|
|
132
166
|
* A UUID. A repeat of the request with the same `requestId` within a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service_account.d.ts","sourceRoot":"","sources":["../../src/v1beta1/service_account.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,OAAO,EAIb,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,+EAA+E;gBACnE,MAAM,EAAE,MAAM;IAI1B;;;OAGG;IACG,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;IAa1G;;;;OAIG;IACG,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAa3H;;;;OAIG;IACI,kBAAkB,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC;IAStI;;;;OAIG;IACG,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;IAehH;;;;;;;OAOG;IACG,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;CAWxG;AAED,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB
|
|
1
|
+
{"version":3,"file":"service_account.d.ts","sourceRoot":"","sources":["../../src/v1beta1/service_account.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,MAA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SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4CAA4C;AAC5C,MAAM,WAAW,2BAA2B;IAC1C,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -61,9 +61,9 @@ export class ServiceAccountClient {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Creates a service account and
|
|
65
|
-
* only place the secret is ever shown: store
|
|
66
|
-
* `iam.service_account.create` on the organization.
|
|
64
|
+
* Creates a service account and, for an `EXTERNAL` one, its client
|
|
65
|
+
* secret. The response is the only place the secret is ever shown: store
|
|
66
|
+
* it now. Needs `iam.service_account.create` on the organization.
|
|
67
67
|
*/
|
|
68
68
|
async createServiceAccount(request, options) {
|
|
69
69
|
if (!request.requestId)
|
|
@@ -94,6 +94,27 @@ export class ServiceAccountClient {
|
|
|
94
94
|
}, options);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* How the service account authenticates. Set when it is created; it
|
|
99
|
+
* never changes.
|
|
100
|
+
*/
|
|
101
|
+
export const ServiceAccount_Type = {
|
|
102
|
+
/**
|
|
103
|
+
* Not set. A create that leaves it unset creates an `EXTERNAL` service
|
|
104
|
+
* account.
|
|
105
|
+
*/
|
|
106
|
+
TYPE_UNSPECIFIED: "TYPE_UNSPECIFIED",
|
|
107
|
+
/**
|
|
108
|
+
* Authenticates with an OAuth 2.0 client id and secret, for software
|
|
109
|
+
* outside Origin Cloud such as a CI pipeline.
|
|
110
|
+
*/
|
|
111
|
+
EXTERNAL: "EXTERNAL",
|
|
112
|
+
/**
|
|
113
|
+
* Has no client id or secret and can't be given one: no credential of
|
|
114
|
+
* its own authenticates as it, wherever it was copied to.
|
|
115
|
+
*/
|
|
116
|
+
WORKLOAD: "WORKLOAD",
|
|
117
|
+
};
|
|
97
118
|
/** Where the service account is in its lifecycle. */
|
|
98
119
|
export const ServiceAccount_State = {
|
|
99
120
|
/** Not set. */
|
|
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CAAC;QAChF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,YAAY,EAAE,EAAE;YACtB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;SAChC,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA0CD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;;;OAGG;IACH,gBAAgB,EAAE,kBAAkB;IACpC;;;OAGG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,QAAQ,EAAE,UAAU;CACZ,CAAC;AAQX,qDAAqD;AACrD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,eAAe;IACf,iBAAiB,EAAE,mBAAmB;IACtC,kCAAkC;IAClC,MAAM,EAAE,QAAQ;IAChB,wEAAwE;IACxE,OAAO,EAAE,SAAS;CACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origincloud/iam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Origin Cloud's IAM service: users, service accounts, roles, role bindings, permissions and the audit log.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/origincloudhq/sdk-typescript#readme",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"!dist/**/*.tsbuildinfo"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@origincloud/core": "^0.
|
|
37
|
+
"@origincloud/core": "^0.16.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@origincloud/core": "^0.
|
|
40
|
+
"@origincloud/core": "^0.16.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -81,9 +81,9 @@ export class ServiceAccountClient {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* Creates a service account and
|
|
85
|
-
* only place the secret is ever shown: store
|
|
86
|
-
* `iam.service_account.create` on the organization.
|
|
84
|
+
* Creates a service account and, for an `EXTERNAL` one, its client
|
|
85
|
+
* secret. The response is the only place the secret is ever shown: store
|
|
86
|
+
* it now. Needs `iam.service_account.create` on the organization.
|
|
87
87
|
*/
|
|
88
88
|
async createServiceAccount(request: CreateServiceAccountRequest, options?: CallOptions): Promise<ServiceAccount> {
|
|
89
89
|
if (!request.requestId) request = { ...request, requestId: newRequestId() };
|
|
@@ -132,12 +132,15 @@ export interface ServiceAccount {
|
|
|
132
132
|
* `serviceAccount:{service_account}`.
|
|
133
133
|
*/
|
|
134
134
|
member?: string;
|
|
135
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* The OAuth 2.0 client id it authenticates with; empty for a `WORKLOAD`
|
|
137
|
+
* service account.
|
|
138
|
+
*/
|
|
136
139
|
clientId?: string;
|
|
137
140
|
/**
|
|
138
141
|
* The OAuth 2.0 client secret it authenticates with. Set only in the
|
|
139
|
-
* response that created
|
|
140
|
-
* it can't be read again.
|
|
142
|
+
* response that created an `EXTERNAL` service account, and empty
|
|
143
|
+
* everywhere else: it can't be read again.
|
|
141
144
|
*/
|
|
142
145
|
clientSecret?: string;
|
|
143
146
|
/** Where the service account is in its lifecycle. */
|
|
@@ -151,8 +154,41 @@ export interface ServiceAccount {
|
|
|
151
154
|
createTime?: string;
|
|
152
155
|
/** When the service account was deleted; unset while it is active. */
|
|
153
156
|
deleteTime?: string;
|
|
157
|
+
/**
|
|
158
|
+
* How the service account authenticates; `EXTERNAL` when the create
|
|
159
|
+
* leaves it unset.
|
|
160
|
+
*/
|
|
161
|
+
type?: ServiceAccount_Type;
|
|
154
162
|
}
|
|
155
163
|
|
|
164
|
+
/**
|
|
165
|
+
* How the service account authenticates. Set when it is created; it
|
|
166
|
+
* never changes.
|
|
167
|
+
*/
|
|
168
|
+
export const ServiceAccount_Type = {
|
|
169
|
+
/**
|
|
170
|
+
* Not set. A create that leaves it unset creates an `EXTERNAL` service
|
|
171
|
+
* account.
|
|
172
|
+
*/
|
|
173
|
+
TYPE_UNSPECIFIED: "TYPE_UNSPECIFIED",
|
|
174
|
+
/**
|
|
175
|
+
* Authenticates with an OAuth 2.0 client id and secret, for software
|
|
176
|
+
* outside Origin Cloud such as a CI pipeline.
|
|
177
|
+
*/
|
|
178
|
+
EXTERNAL: "EXTERNAL",
|
|
179
|
+
/**
|
|
180
|
+
* Has no client id or secret and can't be given one: no credential of
|
|
181
|
+
* its own authenticates as it, wherever it was copied to.
|
|
182
|
+
*/
|
|
183
|
+
WORKLOAD: "WORKLOAD",
|
|
184
|
+
} as const;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* How the service account authenticates. Set when it is created; it
|
|
188
|
+
* never changes.
|
|
189
|
+
*/
|
|
190
|
+
export type ServiceAccount_Type = (typeof ServiceAccount_Type)[keyof typeof ServiceAccount_Type];
|
|
191
|
+
|
|
156
192
|
/** Where the service account is in its lifecycle. */
|
|
157
193
|
export const ServiceAccount_State = {
|
|
158
194
|
/** Not set. */
|
|
@@ -205,7 +241,7 @@ export interface CreateServiceAccountRequest {
|
|
|
205
241
|
* `organizations/{organization}`.
|
|
206
242
|
*/
|
|
207
243
|
parent?: string;
|
|
208
|
-
/** The service account to create: its `displayName`. */
|
|
244
|
+
/** The service account to create: its `displayName` and `type`. */
|
|
209
245
|
serviceAccount?: ServiceAccount;
|
|
210
246
|
/**
|
|
211
247
|
* A UUID. A repeat of the request with the same `requestId` within a
|