@origincloud/iam 0.31.0 → 0.33.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.
@@ -110,9 +110,9 @@ export interface ListAuditLogEntriesRequest {
110
110
  */
111
111
  project?: string;
112
112
  /**
113
- * Only the entries of changes made by this member's account,
114
- * `user:{email}`, `serviceAccount:{service_account}` or
115
- * `serviceAgent:{service_agent}`. Every actor's when empty.
113
+ * Only the entries of changes made by this member, named by its full
114
+ * name as a role binding's member is, or as an entry's `actor` shows it.
115
+ * Every actor's when empty.
116
116
  */
117
117
  actor?: string;
118
118
  /**
@@ -7,7 +7,21 @@ import { type CallOptions, type Client, type Empty, type Service } from "@origin
7
7
  * of its bindings. Each binding is managed on its own, so creating or
8
8
  * deleting one never touches another, whoever made it.
9
9
  *
10
- * A member is written as one of:
10
+ * A member is named by its full name, one of:
11
+ * - `//iam.origincloudapis.eu/users/{user}`: a user, by the id of their
12
+ * account, which must exist and be enabled.
13
+ * - `//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account}`:
14
+ * one of the organization's own service accounts.
15
+ * - `//iam.origincloudapis.eu/serviceAgents/{service_agent}`: a platform
16
+ * service agent, such as `//iam.origincloudapis.eu/serviceAgents/compute`.
17
+ * A service agent is the identity one of the platform's services acts as
18
+ * in an organization. Any organization can bind one, but only to a role
19
+ * its service needs; nobody outside the platform can act as one or get a
20
+ * credential for it. Every organization is created with compute's service
21
+ * agent bound to `roles/kms.grant-delegate`; delete that binding and
22
+ * compute makes no new grants on the organization's keys.
23
+ *
24
+ * A member is also accepted in the form responses show it in:
11
25
  * - `user:{email}`: a user, by the verified email address of their
12
26
  * account. A binding holds on to the account, not the address: it
13
27
  * follows a later change of address, and is always shown with the
@@ -15,13 +29,7 @@ import { type CallOptions, type Client, type Empty, type Service } from "@origin
15
29
  * - `serviceAccount:{service_account}`: a service account of the same
16
30
  * organization, by its id.
17
31
  * - `serviceAgent:{service_agent}`: a platform service agent, by its name,
18
- * such as `serviceAgent:compute`. A service agent is the identity one of
19
- * the platform's services acts as in an organization. Any organization
20
- * can bind one, but only to a role its service needs; nobody outside the
21
- * platform can act as one or get a credential for it. Every organization
22
- * is created with `serviceAgent:compute` bound to
23
- * `roles/kms.grant-delegate`; delete that binding and compute makes no
24
- * new grants on the organization's keys.
32
+ * such as `serviceAgent:compute`.
25
33
  *
26
34
  * and shown, never accepted, as:
27
35
  * - `userId:{user}`: a user by the id of their account, when no verified
@@ -58,12 +66,14 @@ export declare class RoleBindingClient {
58
66
  * organization, for a project binding as well, and every permission of
59
67
  * the role at the binding's scope: a permission held on the organization
60
68
  * counts for any scope, one held on a project only for that project.
61
- * Refused with `NOT_FOUND` when no account has `member`'s address as its
62
- * verified email: nothing is held for an address until its account
63
- * exists. Refused with `CONFLICT` when the member already holds the role
64
- * at that scope, and with `BAD_REQUEST` when the member is a deleted
65
- * service account, names no service agent the platform has, or is a
66
- * service agent and the role isn't one its service needs.
69
+ * Refused with `NOT_FOUND` when `member` names a user without an enabled
70
+ * account, a service account of another organization, or an address no
71
+ * enabled account has verified: nothing is held for an address until its
72
+ * account exists.
73
+ * Refused with `CONFLICT` when the member already holds the role at that
74
+ * scope, and with `BAD_REQUEST` when the member is a deleted service
75
+ * account, names no service agent the platform has, or is a service
76
+ * agent and the role isn't one its service needs.
67
77
  */
68
78
  createRoleBinding(request: CreateRoleBindingRequest, options?: CallOptions): Promise<RoleBinding>;
69
79
  /**
@@ -88,10 +98,12 @@ export interface RoleBinding {
88
98
  */
89
99
  urn?: string;
90
100
  /**
91
- * Who holds the role: `user:{email}`, `serviceAccount:{service_account}`
92
- * or `serviceAgent:{service_agent}`. A user is shown with their
93
- * account's current verified address, as `userId:{user}` when it has
94
- * none, or as `deleted:user:{user}` once the account is gone.
101
+ * Who holds the role: given as a member's full name, such as
102
+ * `//iam.origincloudapis.eu/users/{user}`, or in the form shown here.
103
+ * Shown as `user:{email}`, `serviceAccount:{service_account}` or
104
+ * `serviceAgent:{service_agent}`: a user with their account's current
105
+ * verified address, as `userId:{user}` when it has none, or as
106
+ * `deleted:user:{user}` once the account is gone.
95
107
  */
96
108
  member?: string;
97
109
  /** The role granted, `roles/{role}`. */
@@ -125,9 +137,9 @@ export interface ListRoleBindingsRequest {
125
137
  */
126
138
  parent?: string;
127
139
  /**
128
- * Only the bindings of this member, `user:{email}`,
129
- * `serviceAccount:{service_account}` or `serviceAgent:{service_agent}`.
130
- * Every member's when empty.
140
+ * Only the bindings of this member, by its full name, such as
141
+ * `//iam.origincloudapis.eu/users/{user}`, or as a binding's `member`
142
+ * shows it. Every member's when empty.
131
143
  */
132
144
  member?: string;
133
145
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"role_binding.d.ts","sourceRoot":"","sources":["../../src/v1beta1/role_binding.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,OAAO,EAIb,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,iBAAiB;IAC5B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,4EAA4E;gBAChE,MAAM,EAAE,MAAM;IAI1B,2EAA2E;IACrE,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAejG;;;;;;OAMG;IACG,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAelH;;;;OAIG;IACI,eAAe,CAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC;IAS7H;;;;;;;;;;;OAWG;IACG,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,EAAE,OAAO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;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -9,7 +9,21 @@ import { newRequestId, pathValue, query, } from "@origincloud/core";
9
9
  * of its bindings. Each binding is managed on its own, so creating or
10
10
  * deleting one never touches another, whoever made it.
11
11
  *
12
- * A member is written as one of:
12
+ * A member is named by its full name, one of:
13
+ * - `//iam.origincloudapis.eu/users/{user}`: a user, by the id of their
14
+ * account, which must exist and be enabled.
15
+ * - `//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account}`:
16
+ * one of the organization's own service accounts.
17
+ * - `//iam.origincloudapis.eu/serviceAgents/{service_agent}`: a platform
18
+ * service agent, such as `//iam.origincloudapis.eu/serviceAgents/compute`.
19
+ * A service agent is the identity one of the platform's services acts as
20
+ * in an organization. Any organization can bind one, but only to a role
21
+ * its service needs; nobody outside the platform can act as one or get a
22
+ * credential for it. Every organization is created with compute's service
23
+ * agent bound to `roles/kms.grant-delegate`; delete that binding and
24
+ * compute makes no new grants on the organization's keys.
25
+ *
26
+ * A member is also accepted in the form responses show it in:
13
27
  * - `user:{email}`: a user, by the verified email address of their
14
28
  * account. A binding holds on to the account, not the address: it
15
29
  * follows a later change of address, and is always shown with the
@@ -17,13 +31,7 @@ import { newRequestId, pathValue, query, } from "@origincloud/core";
17
31
  * - `serviceAccount:{service_account}`: a service account of the same
18
32
  * organization, by its id.
19
33
  * - `serviceAgent:{service_agent}`: a platform service agent, by its name,
20
- * such as `serviceAgent:compute`. A service agent is the identity one of
21
- * the platform's services acts as in an organization. Any organization
22
- * can bind one, but only to a role its service needs; nobody outside the
23
- * platform can act as one or get a credential for it. Every organization
24
- * is created with `serviceAgent:compute` bound to
25
- * `roles/kms.grant-delegate`; delete that binding and compute makes no
26
- * new grants on the organization's keys.
34
+ * such as `serviceAgent:compute`.
27
35
  *
28
36
  * and shown, never accepted, as:
29
37
  * - `userId:{user}`: a user by the id of their account, when no verified
@@ -92,12 +100,14 @@ export class RoleBindingClient {
92
100
  * organization, for a project binding as well, and every permission of
93
101
  * the role at the binding's scope: a permission held on the organization
94
102
  * counts for any scope, one held on a project only for that project.
95
- * Refused with `NOT_FOUND` when no account has `member`'s address as its
96
- * verified email: nothing is held for an address until its account
97
- * exists. Refused with `CONFLICT` when the member already holds the role
98
- * at that scope, and with `BAD_REQUEST` when the member is a deleted
99
- * service account, names no service agent the platform has, or is a
100
- * service agent and the role isn't one its service needs.
103
+ * Refused with `NOT_FOUND` when `member` names a user without an enabled
104
+ * account, a service account of another organization, or an address no
105
+ * enabled account has verified: nothing is held for an address until its
106
+ * account exists.
107
+ * Refused with `CONFLICT` when the member already holds the role at that
108
+ * scope, and with `BAD_REQUEST` when the member is a deleted service
109
+ * account, names no service agent the platform has, or is a service
110
+ * agent and the role isn't one its service needs.
101
111
  */
102
112
  async createRoleBinding(request, options) {
103
113
  if (!request.requestId)
@@ -1 +1 @@
1
- {"version":3,"file":"role_binding.js","sourceRoot":"","sources":["../../src/v1beta1/role_binding.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,qDAAqD;AAErD,OAAO,EAKL,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,iBAAiB;IAC5B;;;OAGG;IACM,OAAO,CAAU;IAE1B,4EAA4E;IAC5E,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED,2EAA2E;IAC3E,KAAK,CAAC,cAAc,CAAC,OAA8B,EAAE,OAAqB;QACxE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,gCAAgC,CAAC,CAAC;QACn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E,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,CAAC;QAC5E,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,gCAAgC,CAAC,CAAC;QACnE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;YAAE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACpE,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;YAC/B,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
@@ -2,9 +2,11 @@ import { type CallOptions, type Client, type Service } from "@origincloud/core";
2
2
  /**
3
3
  * Calls UserService.
4
4
  *
5
- * The signed-in user. Each user can read only their own profile, by the
6
- * name `users/me` or by their own id; the role bindings they hold are
7
- * listed by ListRoleBindings with the parent `organizations/-`.
5
+ * Users. Each user can read only their own profile, by the name `users/me`
6
+ * or by their own id; the role bindings they hold are listed by
7
+ * ListRoleBindings with the parent `organizations/-`. Anyone who may grant
8
+ * roles in an organization can look a user up by email address, to name
9
+ * them in a role binding.
8
10
  */
9
11
  export declare class UserClient {
10
12
  /**
@@ -20,6 +22,17 @@ export declare class UserClient {
20
22
  * profile.
21
23
  */
22
24
  getUser(request: GetUserRequest, options?: CallOptions): Promise<User>;
25
+ /**
26
+ * Looks up the user whose account has verified an email address, and
27
+ * answers them with their `name`: their full name is
28
+ * `//iam.origincloudapis.eu/` followed by it, which is how a role
29
+ * binding names them as a member. Needs `iam.role.assign` on
30
+ * `organization`, the permission a binding of the user needs anyway.
31
+ * Refused with `NOT_FOUND` when no enabled account has verified the
32
+ * address, and with `CONFLICT` when more than one has. The answer leaves
33
+ * `givenName` and `familyName` empty: only the user reads those.
34
+ */
35
+ lookupUser(request: LookupUserRequest, options?: CallOptions): Promise<User>;
23
36
  }
24
37
  /** A person who signs in to the platform. */
25
38
  export interface User {
@@ -47,4 +60,17 @@ export interface GetUserRequest {
47
60
  /** The user to return: `users/me`, or the caller's own `users/{user}`. */
48
61
  name?: string;
49
62
  }
63
+ /** The request for LookupUser. */
64
+ export interface LookupUserRequest {
65
+ /**
66
+ * The email address the user's account has verified, matched exactly,
67
+ * case aside.
68
+ */
69
+ email?: string;
70
+ /**
71
+ * The organization the caller looks the user up for, where it needs
72
+ * `iam.role.assign`: `organizations/{organization}`, or its full name.
73
+ */
74
+ organization?: string;
75
+ }
50
76
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAElG;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,qEAAqE;gBACzD,MAAM,EAAE,MAAM;IAI1B;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAc7E;AAED,6CAA6C;AAC7C,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;I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,kCAAkC;AAClC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -4,9 +4,11 @@ import { pathValue, query } from "@origincloud/core";
4
4
  /**
5
5
  * Calls UserService.
6
6
  *
7
- * The signed-in user. Each user can read only their own profile, by the
8
- * name `users/me` or by their own id; the role bindings they hold are
9
- * listed by ListRoleBindings with the parent `organizations/-`.
7
+ * Users. Each user can read only their own profile, by the name `users/me`
8
+ * or by their own id; the role bindings they hold are listed by
9
+ * ListRoleBindings with the parent `organizations/-`. Anyone who may grant
10
+ * roles in an organization can look a user up by email address, to name
11
+ * them in a role binding.
10
12
  */
11
13
  export class UserClient {
12
14
  /**
@@ -35,5 +37,23 @@ export class UserClient {
35
37
  idempotent: true,
36
38
  }, options);
37
39
  }
40
+ /**
41
+ * Looks up the user whose account has verified an email address, and
42
+ * answers them with their `name`: their full name is
43
+ * `//iam.origincloudapis.eu/` followed by it, which is how a role
44
+ * binding names them as a member. Needs `iam.role.assign` on
45
+ * `organization`, the permission a binding of the user needs anyway.
46
+ * Refused with `NOT_FOUND` when no enabled account has verified the
47
+ * address, and with `CONFLICT` when more than one has. The answer leaves
48
+ * `givenName` and `familyName` empty: only the user reads those.
49
+ */
50
+ async lookupUser(request, options) {
51
+ return this.service.call({
52
+ method: "GET",
53
+ path: `/v1beta1/users:lookup`,
54
+ query: query(request, []),
55
+ idempotent: true,
56
+ }, options);
57
+ }
38
58
  }
39
59
  //# sourceMappingURL=user.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,6CAA6C;AAE7C,OAAO,EAA+C,SAAS,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,OAAO,UAAU;IACrB;;;OAGG;IACM,OAA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,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;QAC5C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;YAAE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY,EAAE,EAAE;YACtB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YAC/B,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,UAAU,CAAC,OAA0B,EAAE,OAAqB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACzB,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@origincloud/iam",
3
- "version": "0.31.0",
3
+ "version": "0.33.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.31.0"
37
+ "@origincloud/core": "^0.33.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@origincloud/core": "^0.31.0"
40
+ "@origincloud/core": "^0.33.0"
41
41
  }
42
42
  }
@@ -158,9 +158,9 @@ export interface ListAuditLogEntriesRequest {
158
158
  */
159
159
  project?: string;
160
160
  /**
161
- * Only the entries of changes made by this member's account,
162
- * `user:{email}`, `serviceAccount:{service_account}` or
163
- * `serviceAgent:{service_agent}`. Every actor's when empty.
161
+ * Only the entries of changes made by this member, named by its full
162
+ * name as a role binding's member is, or as an entry's `actor` shows it.
163
+ * Every actor's when empty.
164
164
  */
165
165
  actor?: string;
166
166
  /**
@@ -19,7 +19,21 @@ import {
19
19
  * of its bindings. Each binding is managed on its own, so creating or
20
20
  * deleting one never touches another, whoever made it.
21
21
  *
22
- * A member is written as one of:
22
+ * A member is named by its full name, one of:
23
+ * - `//iam.origincloudapis.eu/users/{user}`: a user, by the id of their
24
+ * account, which must exist and be enabled.
25
+ * - `//iam.origincloudapis.eu/organizations/{organization}/serviceAccounts/{service_account}`:
26
+ * one of the organization's own service accounts.
27
+ * - `//iam.origincloudapis.eu/serviceAgents/{service_agent}`: a platform
28
+ * service agent, such as `//iam.origincloudapis.eu/serviceAgents/compute`.
29
+ * A service agent is the identity one of the platform's services acts as
30
+ * in an organization. Any organization can bind one, but only to a role
31
+ * its service needs; nobody outside the platform can act as one or get a
32
+ * credential for it. Every organization is created with compute's service
33
+ * agent bound to `roles/kms.grant-delegate`; delete that binding and
34
+ * compute makes no new grants on the organization's keys.
35
+ *
36
+ * A member is also accepted in the form responses show it in:
23
37
  * - `user:{email}`: a user, by the verified email address of their
24
38
  * account. A binding holds on to the account, not the address: it
25
39
  * follows a later change of address, and is always shown with the
@@ -27,13 +41,7 @@ import {
27
41
  * - `serviceAccount:{service_account}`: a service account of the same
28
42
  * organization, by its id.
29
43
  * - `serviceAgent:{service_agent}`: a platform service agent, by its name,
30
- * such as `serviceAgent:compute`. A service agent is the identity one of
31
- * the platform's services acts as in an organization. Any organization
32
- * can bind one, but only to a role its service needs; nobody outside the
33
- * platform can act as one or get a credential for it. Every organization
34
- * is created with `serviceAgent:compute` bound to
35
- * `roles/kms.grant-delegate`; delete that binding and compute makes no
36
- * new grants on the organization's keys.
44
+ * such as `serviceAgent:compute`.
37
45
  *
38
46
  * and shown, never accepted, as:
39
47
  * - `userId:{user}`: a user by the id of their account, when no verified
@@ -110,12 +118,14 @@ export class RoleBindingClient {
110
118
  * organization, for a project binding as well, and every permission of
111
119
  * the role at the binding's scope: a permission held on the organization
112
120
  * counts for any scope, one held on a project only for that project.
113
- * Refused with `NOT_FOUND` when no account has `member`'s address as its
114
- * verified email: nothing is held for an address until its account
115
- * exists. Refused with `CONFLICT` when the member already holds the role
116
- * at that scope, and with `BAD_REQUEST` when the member is a deleted
117
- * service account, names no service agent the platform has, or is a
118
- * service agent and the role isn't one its service needs.
121
+ * Refused with `NOT_FOUND` when `member` names a user without an enabled
122
+ * account, a service account of another organization, or an address no
123
+ * enabled account has verified: nothing is held for an address until its
124
+ * account exists.
125
+ * Refused with `CONFLICT` when the member already holds the role at that
126
+ * scope, and with `BAD_REQUEST` when the member is a deleted service
127
+ * account, names no service agent the platform has, or is a service
128
+ * agent and the role isn't one its service needs.
119
129
  */
120
130
  async createRoleBinding(request: CreateRoleBindingRequest, options?: CallOptions): Promise<RoleBinding> {
121
131
  if (!request.requestId) request = { ...request, requestId: newRequestId() };
@@ -171,10 +181,12 @@ export interface RoleBinding {
171
181
  */
172
182
  urn?: string;
173
183
  /**
174
- * Who holds the role: `user:{email}`, `serviceAccount:{service_account}`
175
- * or `serviceAgent:{service_agent}`. A user is shown with their
176
- * account's current verified address, as `userId:{user}` when it has
177
- * none, or as `deleted:user:{user}` once the account is gone.
184
+ * Who holds the role: given as a member's full name, such as
185
+ * `//iam.origincloudapis.eu/users/{user}`, or in the form shown here.
186
+ * Shown as `user:{email}`, `serviceAccount:{service_account}` or
187
+ * `serviceAgent:{service_agent}`: a user with their account's current
188
+ * verified address, as `userId:{user}` when it has none, or as
189
+ * `deleted:user:{user}` once the account is gone.
178
190
  */
179
191
  member?: string;
180
192
  /** The role granted, `roles/{role}`. */
@@ -210,9 +222,9 @@ export interface ListRoleBindingsRequest {
210
222
  */
211
223
  parent?: string;
212
224
  /**
213
- * Only the bindings of this member, `user:{email}`,
214
- * `serviceAccount:{service_account}` or `serviceAgent:{service_agent}`.
215
- * Every member's when empty.
225
+ * Only the bindings of this member, by its full name, such as
226
+ * `//iam.origincloudapis.eu/users/{user}`, or as a binding's `member`
227
+ * shows it. Every member's when empty.
216
228
  */
217
229
  member?: string;
218
230
  /**
@@ -6,9 +6,11 @@ import { type CallOptions, type Client, type Service, pathValue, query } from "@
6
6
  /**
7
7
  * Calls UserService.
8
8
  *
9
- * The signed-in user. Each user can read only their own profile, by the
10
- * name `users/me` or by their own id; the role bindings they hold are
11
- * listed by ListRoleBindings with the parent `organizations/-`.
9
+ * Users. Each user can read only their own profile, by the name `users/me`
10
+ * or by their own id; the role bindings they hold are listed by
11
+ * ListRoleBindings with the parent `organizations/-`. Anyone who may grant
12
+ * roles in an organization can look a user up by email address, to name
13
+ * them in a role binding.
12
14
  */
13
15
  export class UserClient {
14
16
  /**
@@ -41,6 +43,28 @@ export class UserClient {
41
43
  options,
42
44
  );
43
45
  }
46
+
47
+ /**
48
+ * Looks up the user whose account has verified an email address, and
49
+ * answers them with their `name`: their full name is
50
+ * `//iam.origincloudapis.eu/` followed by it, which is how a role
51
+ * binding names them as a member. Needs `iam.role.assign` on
52
+ * `organization`, the permission a binding of the user needs anyway.
53
+ * Refused with `NOT_FOUND` when no enabled account has verified the
54
+ * address, and with `CONFLICT` when more than one has. The answer leaves
55
+ * `givenName` and `familyName` empty: only the user reads those.
56
+ */
57
+ async lookupUser(request: LookupUserRequest, options?: CallOptions): Promise<User> {
58
+ return this.service.call<User>(
59
+ {
60
+ method: "GET",
61
+ path: `/v1beta1/users:lookup`,
62
+ query: query(request, []),
63
+ idempotent: true,
64
+ },
65
+ options,
66
+ );
67
+ }
44
68
  }
45
69
 
46
70
  /** A person who signs in to the platform. */
@@ -70,3 +94,17 @@ export interface GetUserRequest {
70
94
  /** The user to return: `users/me`, or the caller's own `users/{user}`. */
71
95
  name?: string;
72
96
  }
97
+
98
+ /** The request for LookupUser. */
99
+ export interface LookupUserRequest {
100
+ /**
101
+ * The email address the user's account has verified, matched exactly,
102
+ * case aside.
103
+ */
104
+ email?: string;
105
+ /**
106
+ * The organization the caller looks the user up for, where it needs
107
+ * `iam.role.assign`: `organizations/{organization}`, or its full name.
108
+ */
109
+ organization?: string;
110
+ }