Benign go Download

lib/googleauth/compute_engine.rb

References a Google API hostCode embeds cleartext HTTP URL literal
SHA-256a3579c5ff8e52399fb55c9d9817a9ffc506cdabf7fbc0214080fd25910e158d4
MaleculeH(Cm₃)Md

Evidence

English function-word token "the" lines 1–7
1# Copyright 2015 Google, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/L …
English function-word token "and" lines 11–22
11:46… D, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15require "google-cloud-env"
16require "googleauth/signet"
17
18module Google
19 # Module Auth provides classes that provide Google-specific authorization
20 # used to access Google APIs.
21 module Auth
22 NO_META …
References the OAuth 2 protocol lines 30–35
30:4… the default service account
31 ERROR
32
33 # Extends Signet::OAuth2::Client so that the auth token is obtained from
34 # the GCE metadata server.
35 class GCECredentials < Signet::OAuth2::Clien …
Cloud instance metadata link-local address lines 36–51
36:48… ined to prevent breaking changes
37 DEFAULT_METADATA_HOST = "169.254.169.254".freeze
38
39 # @private Unused and deprecated but retained to prevent breaking changes
40 COMPUTE_AUTH_TOKEN_URI =
41 "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token".freeze
42 # @private Unused and deprecated but retained to prevent breaking changes
43 COMPUTE_ID_TOKEN_URI =
44 "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/identity".freeze
45 # @private Unused and deprecated but retained to prevent breaking changes
46 COMPUTE_CHECK_URI = "http://169.254.169.254".freeze
47
48 class << self
49 # @private Unused and deprecated
50 def metadata_host
51 ENV.fetch "GCE_METADA …
References a Google API host lines 122–125
122:54… tadata "universe", "universe_domain"
123 universe_domain = "googleapis.com" if !universe_domain || universe_domain.empty?
124 hash["universe_domain"] = universe_domain.strip
125 # The response m …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.