Skip to content

Commit cc340ea

Browse files
yoshi-automationbusunkim96
authored andcommitted
[CHANGE ME] Re-generated iam to pick up changes in the API or client library generator. (#7595)
1 parent 6d1e3b9 commit cc340ea

File tree

3 files changed

+128
-23
lines changed

3 files changed

+128
-23
lines changed

packages/google-cloud-iam/docs/conf.py

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# -- General configuration ------------------------------------------------
2626

2727
# If your documentation needs a minimal Sphinx version, state it here.
28-
# needs_sphinx = '1.0'
28+
needs_sphinx = "1.6.3"
2929

3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -36,6 +36,7 @@
3636
"sphinx.ext.intersphinx",
3737
"sphinx.ext.coverage",
3838
"sphinx.ext.napoleon",
39+
"sphinx.ext.todo",
3940
"sphinx.ext.viewcode",
4041
]
4142

@@ -47,10 +48,14 @@
4748
# Add any paths that contain templates here, relative to this directory.
4849
templates_path = ["_templates"]
4950

51+
# Allow markdown includes (so releases.md can include CHANGLEOG.md)
52+
# http://www.sphinx-doc.org/en/master/markdown.html
53+
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
54+
5055
# The suffix(es) of source filenames.
5156
# You can specify multiple suffix as a list of string:
5257
# source_suffix = ['.rst', '.md']
53-
source_suffix = ".rst"
58+
source_suffix = [".rst", ".md"]
5459

5560
# The encoding of source files.
5661
# source_encoding = 'utf-8-sig'
@@ -120,12 +125,20 @@
120125

121126
# The theme to use for HTML and HTML Help pages. See the documentation for
122127
# a list of builtin themes.
123-
html_theme = "sphinx_rtd_theme"
128+
html_theme = "alabaster"
124129

125130
# Theme options are theme-specific and customize the look and feel of a theme
126131
# further. For a list of options available for each theme, see the
127132
# documentation.
128-
# html_theme_options = {}
133+
html_theme_options = {
134+
"description": "Google Cloud Client Libraries for Python",
135+
"github_user": "googleapis",
136+
"github_repo": "google-cloud-python",
137+
"github_banner": True,
138+
"font_family": "'Roboto', Georgia, sans",
139+
"head_font_family": "'Roboto', Georgia, serif",
140+
"code_font_family": "'Roboto Mono', 'Consolas', monospace",
141+
}
129142

130143
# Add any paths that contain custom themes here, relative to this directory.
131144
# html_theme_path = []
@@ -214,6 +227,17 @@
214227
# Output file base name for HTML help builder.
215228
htmlhelp_basename = "google-cloud-iam-doc"
216229

230+
# -- Options for warnings ------------------------------------------------------
231+
232+
suppress_warnings = [
233+
# Temporarily suppress this to avoid "more than one target found for
234+
# cross-reference" warning, which are intractable for us to avoid while in
235+
# a mono-repo.
236+
# See https://github.com/sphinx-doc/sphinx/blob
237+
# /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843
238+
"ref.python"
239+
]
240+
217241
# -- Options for LaTeX output ---------------------------------------------
218242

219243
latex_elements = {
@@ -304,6 +328,16 @@
304328
intersphinx_mapping = {
305329
"python": ("http://python.readthedocs.org/en/latest/", None),
306330
"gax": ("https://gax-python.readthedocs.org/en/latest/", None),
331+
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
332+
"google-gax": ("https://gax-python.readthedocs.io/en/latest/", None),
333+
"google.api_core": (
334+
"https://googleapis.github.io/google-cloud-python/latest",
335+
None,
336+
),
337+
"grpc": ("https://grpc.io/grpc/python/", None),
338+
"requests": ("http://docs.python-requests.org/en/master/", None),
339+
"fastavro": ("https://fastavro.readthedocs.io/en/stable/", None),
340+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
307341
}
308342

309343
# Napoleon settings

packages/google-cloud-iam/google/cloud/iam_credentials_v1/gapic/iam_credentials_client.py

Lines changed: 85 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import google.api_core.gapic_v1.client_info
2323
import google.api_core.gapic_v1.config
2424
import google.api_core.gapic_v1.method
25+
import google.api_core.gapic_v1.routing_header
2526
import google.api_core.grpc_helpers
2627
import google.api_core.path_template
2728
import grpc
@@ -267,6 +268,19 @@ def generate_access_token(
267268
request = common_pb2.GenerateAccessTokenRequest(
268269
name=name, scope=scope, delegates=delegates, lifetime=lifetime
269270
)
271+
if metadata is None:
272+
metadata = []
273+
metadata = list(metadata)
274+
try:
275+
routing_header = [("name", name)]
276+
except AttributeError:
277+
pass
278+
else:
279+
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
280+
routing_header
281+
)
282+
metadata.append(routing_metadata)
283+
270284
return self._inner_api_calls["generate_access_token"](
271285
request, retry=retry, timeout=timeout, metadata=metadata
272286
)
@@ -349,6 +363,19 @@ def generate_id_token(
349363
delegates=delegates,
350364
include_email=include_email,
351365
)
366+
if metadata is None:
367+
metadata = []
368+
metadata = list(metadata)
369+
try:
370+
routing_header = [("name", name)]
371+
except AttributeError:
372+
pass
373+
else:
374+
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
375+
routing_header
376+
)
377+
metadata.append(routing_metadata)
378+
352379
return self._inner_api_calls["generate_id_token"](
353380
request, retry=retry, timeout=timeout, metadata=metadata
354381
)
@@ -424,6 +451,19 @@ def sign_blob(
424451
request = common_pb2.SignBlobRequest(
425452
name=name, payload=payload, delegates=delegates
426453
)
454+
if metadata is None:
455+
metadata = []
456+
metadata = list(metadata)
457+
try:
458+
routing_header = [("name", name)]
459+
except AttributeError:
460+
pass
461+
else:
462+
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
463+
routing_header
464+
)
465+
metadata.append(routing_metadata)
466+
427467
return self._inner_api_calls["sign_blob"](
428468
request, retry=retry, timeout=timeout, metadata=metadata
429469
)
@@ -499,6 +539,19 @@ def sign_jwt(
499539
request = common_pb2.SignJwtRequest(
500540
name=name, payload=payload, delegates=delegates
501541
)
542+
if metadata is None:
543+
metadata = []
544+
metadata = list(metadata)
545+
try:
546+
routing_header = [("name", name)]
547+
except AttributeError:
548+
pass
549+
else:
550+
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
551+
routing_header
552+
)
553+
metadata.append(routing_metadata)
554+
502555
return self._inner_api_calls["sign_jwt"](
503556
request, retry=retry, timeout=timeout, metadata=metadata
504557
)
@@ -543,20 +596,25 @@ def generate_identity_binding_access_token(
543596
(https://tools.ietf.org/html/rfc7523) and must have 'kid' field in the
544597
header. Supported signing algorithms: RS256 (RS512, ES256, ES512 coming
545598
soon). Mandatory payload fields (along the lines of RFC 7523, section
546-
3): - iss: issuer of the token. Must provide a discovery document at
547-
$iss/.well-known/openid-configuration . The document needs to be
548-
formatted according to section 4.2 of the OpenID Connect Discovery 1.0
549-
specification. - iat: Issue time in seconds since epoch. Must be in the
550-
past. - exp: Expiration time in seconds since epoch. Must be less than
551-
48 hours after iat. We recommend to create tokens that last shorter than
552-
6 hours to improve security unless business reasons mandate longer
553-
expiration times. Shorter token lifetimes are generally more secure
554-
since tokens that have been exfiltrated by attackers can be used for a
555-
shorter time. you can configure the maximum lifetime of the incoming
556-
token in the configuration of the mapper. The resulting Google token
557-
will expire within an hour or at "exp", whichever is earlier. - sub: JWT
558-
subject, identity asserted in the JWT. - aud: Configured in the mapper
559-
policy. By default the service account email.
599+
3):
600+
601+
- iss: issuer of the token. Must provide a discovery document at
602+
$iss/.well-known/openid-configuration . The document needs to be
603+
formatted according to section 4.2 of the OpenID Connect Discovery
604+
1.0 specification.
605+
- iat: Issue time in seconds since epoch. Must be in the past.
606+
- exp: Expiration time in seconds since epoch. Must be less than 48
607+
hours after iat. We recommend to create tokens that last shorter than
608+
6 hours to improve security unless business reasons mandate longer
609+
expiration times. Shorter token lifetimes are generally more secure
610+
since tokens that have been exfiltrated by attackers can be used for
611+
a shorter time. you can configure the maximum lifetime of the
612+
incoming token in the configuration of the mapper. The resulting
613+
Google token will expire within an hour or at "exp", whichever is
614+
earlier.
615+
- sub: JWT subject, identity asserted in the JWT.
616+
- aud: Configured in the mapper policy. By default the service account
617+
email.
560618
561619
Claims from the incoming token can be transferred into the output token
562620
accoding to the mapper configuration. The outgoing claim size is
@@ -606,6 +664,19 @@ def generate_identity_binding_access_token(
606664
request = common_pb2.GenerateIdentityBindingAccessTokenRequest(
607665
name=name, scope=scope, jwt=jwt
608666
)
667+
if metadata is None:
668+
metadata = []
669+
metadata = list(metadata)
670+
try:
671+
routing_header = [("name", name)]
672+
except AttributeError:
673+
pass
674+
else:
675+
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
676+
routing_header
677+
)
678+
metadata.append(routing_metadata)
679+
609680
return self._inner_api_calls["generate_identity_binding_access_token"](
610681
request, retry=retry, timeout=timeout, metadata=metadata
611682
)

packages/google-cloud-iam/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-03-01T13:15:22.601913Z",
2+
"updateTime": "2019-03-28T12:14:39.937996Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.16.14",
8-
"dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7"
7+
"version": "0.16.20",
8+
"dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "41d72d444fbe445f4da89e13be02078734fb7875",
16-
"internalRef": "236230004"
15+
"sha": "6a84b3267b0a95e922608b9891219075047eee29",
16+
"internalRef": "240640999"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)