This file is indexed.

/usr/lib/ruby/vendor_ruby/ms_rest_azure/azure_environment.rb is in ruby-ms-rest-azure 0.6.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# encoding: utf-8
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

module MsRestAzure
  module AzureEnvironments
    #
    # An instance of this class describes an environment in Azure
    #
    class AzureEnvironment

      # @return [String] the Environment name
      attr_reader :name

      # @return [String] the management portal URL
      attr_reader :portal_url

      # @return [String] the publish settings file URL
      attr_reader :publishing_profile_url

      # @return [String] the management service endpoint
      attr_reader :management_endpoint_url

      # @return [String] the resource management endpoint
      attr_reader :resource_manager_endpoint_url

      # @return [String] the sql server management endpoint for mobile commands
      attr_reader :sql_management_endpoint_url

      # @return [String] the dns suffix for sql servers
      attr_reader :sql_server_hostname_suffix

      # @return [String] the template gallery endpoint
      attr_reader :gallery_endpoint_url

      # @return [String] the Active Directory login endpoint
      attr_reader :active_directory_endpoint_url

      # @return [String] the resource ID to obtain AD tokens for
      attr_reader :active_directory_resource_id

      # @return [String] the Active Directory resource ID
      attr_reader :active_directory_graph_resource_id

      # @return [String] the Active Directory resource ID
      attr_reader :active_directory_graph_api_version

      # @return [String] the endpoint suffix for storage accounts
      attr_reader :storage_endpoint_suffix

      # @return [String] the KeyVault service dns suffix
      attr_reader :key_vault_dns_suffix

      # @return [String] the data lake store filesystem service dns suffix
      attr_reader :datalake_store_filesystem_endpoint_suffix

      # @return [String] the data lake analytics job and catalog service dns suffix
      attr_reader :datalake_analytics_catalog_and_job_endpoint_suffix

      # @return [Boolean] determines whether the authentication endpoint should be validated with Azure AD. Default value is true.
      attr_reader :validate_authority

      def initialize(options)
        required_properties = [:name, :portal_url, :management_endpoint_url, :resource_manager_endpoint_url, :active_directory_endpoint_url, :active_directory_resource_id]

        required_supplied_properties = required_properties & options.keys

        if required_supplied_properties.nil? || required_supplied_properties.empty? || (required_supplied_properties & required_properties) != required_properties
          raise ArgumentError.new("#{required_properties.to_s} are the required properties but provided properties are #{options.to_s}")
        end

        required_supplied_properties.each do |prop|
          if options[prop].nil? || !options[prop].is_a?(String) || options[prop].empty?
            raise ArgumentError.new("Value of the '#{prop}' property must be of type String and non empty.")
          end
        end

        # Setting default to true
        @validate_authority = true

        options.each do |k, v|
          instance_variable_set("@#{k}", v) unless v.nil?
        end
      end
    end

    Azure = AzureEnvironments::AzureEnvironment.new({
                                                        :name => 'Azure',
                                                        :portal_url => 'http://go.microsoft.com/fwlink/?LinkId=254433',
                                                        :publishing_profile_url => 'http://go.microsoft.com/fwlink/?LinkId=254432',
                                                        :management_endpoint_url => 'https://management.core.windows.net',
                                                        :resource_manager_endpoint_url => 'https://management.azure.com/',
                                                        :sql_management_endpoint_url => 'https://management.core.windows.net:8443/',
                                                        :sql_server_hostname_suffix => '.database.windows.net',
                                                        :gallery_endpoint_url => 'https://gallery.azure.com/',
                                                        :active_directory_endpoint_url => 'https://login.microsoftonline.com/',
                                                        :active_directory_resource_id => 'https://management.core.windows.net/',
                                                        :active_directory_graph_resource_id => 'https://graph.windows.net/',
                                                        :active_directory_graph_api_version => '2013-04-05',
                                                        :storage_endpoing_suffix => '.core.windows.net',
                                                        :key_vault_dns_suffix => '.vault.azure.net',
                                                        :datalake_store_filesystem_endpoint_suffix => 'azuredatalakestore.net',
                                                        :datalake_analytics_catalog_and_job_endpoint_suffix => 'azuredatalakeanalytics.net'
                                                    })
    AzureChina = AzureEnvironments::AzureEnvironment.new({
                                                             :name => 'AzureChina',
                                                             :portal_url => 'http://go.microsoft.com/fwlink/?LinkId=301902',
                                                             :publishing_profile_url => 'http://go.microsoft.com/fwlink/?LinkID=301774',
                                                             :management_endpoint_url => 'https://management.core.chinacloudapi.cn',
                                                             :resource_manager_endpoint_url => 'https://management.chinacloudapi.cn',
                                                             :sql_management_endpoint_url => 'https://management.core.chinacloudapi.cn:8443/',
                                                             :sql_server_hostname_suffix => '.database.chinacloudapi.cn',
                                                             :gallery_endpoint_url => 'https://gallery.chinacloudapi.cn/',
                                                             :active_directory_endpoint_url => 'https://login.chinacloudapi.cn/',
                                                             :active_directory_resource_id => 'https://management.core.chinacloudapi.cn/',
                                                             :active_directory_graph_resource_id => 'https://graph.chinacloudapi.cn/',
                                                             :active_directory_graph_api_version => '2013-04-05',
                                                             :storage_endpoing_suffix => '.core.chinacloudapi.cn',
                                                             :key_vault_dns_suffix => '.vault.azure.cn',
                                                             # TODO: add dns suffixes for the china cloud for datalake store and datalake analytics once they are defined.
                                                             :datalake_store_filesystem_endpoint_suffix => 'N/A',
                                                             :datalake_analytics_catalog_and_job_endpoint_suffix => 'N/A'
                                                         })
    AzureUSGovernment = AzureEnvironments::AzureEnvironment.new({
                                                                    :name => 'AzureUSGovernment',
                                                                    :portal_url => 'https://manage.windowsazure.us',
                                                                    :publishing_profile_url => 'https://manage.windowsazure.us/publishsettings/index',
                                                                    :management_endpoint_url => 'https://management.core.usgovcloudapi.net',
                                                                    :resource_manager_endpoint_url => 'https://management.usgovcloudapi.net',
                                                                    :sql_management_endpoint_url => 'https://management.core.usgovcloudapi.net:8443/',
                                                                    :sql_server_hostname_suffix => '.database.usgovcloudapi.net',
                                                                    :gallery_endpoint_url => 'https://gallery.usgovcloudapi.net/',
                                                                    :active_directory_endpoint_url => 'https://login.microsoftonline.com/',
                                                                    :active_directory_resource_id => 'https://management.core.usgovcloudapi.net/',
                                                                    :active_directory_graph_resource_id => 'https://graph.windows.net/',
                                                                    :active_directory_graph_api_version => '2013-04-05',
                                                                    :storage_endpoing_suffix => '.core.usgovcloudapi.net',
                                                                    :key_vault_dns_suffix => '.vault.usgovcloudapi.net',
                                                                    # TODO: add dns suffixes for the US government for datalake store and datalake analytics once they are defined.
                                                                    :datalake_store_filesystem_endpoint_suffix => 'N/A',
                                                                    :datalake_analytics_catalog_and_job_endpoint_suffix => 'N/A'
                                                                })
    AzureGermanCloud = AzureEnvironments::AzureEnvironment.new({
                                                                   :name => 'AzureGermanCloud',
                                                                   :portal_url => 'http://portal.microsoftazure.de/',
                                                                   :publishing_profile_url => 'https://manage.microsoftazure.de/publishsettings/index',
                                                                   :management_endpoint_url => 'https://management.core.cloudapi.de',
                                                                   :resource_manager_endpoint_url => 'https://management.microsoftazure.de',
                                                                   :sql_management_endpoint_url => 'https://management.core.cloudapi.de:8443/',
                                                                   :sql_server_hostname_suffix => '.database.cloudapi.de',
                                                                   :gallery_endpoint_url => 'https://gallery.cloudapi.de/',
                                                                   :active_directory_endpoint_url => 'https://login.microsoftonline.de/',
                                                                   :active_directory_resource_id => 'https://management.core.cloudapi.de/',
                                                                   :active_directory_graph_resource_id => 'https://graph.cloudapi.de/',
                                                                   :active_directory_graph_api_version => '2013-04-05',
                                                                   :storage_endpoing_suffix => '.core.cloudapi.de',
                                                                   :key_vault_dns_suffix => '.vault.microsoftazure.de',
                                                                   # TODO: add dns suffixes for the US government for datalake store and datalake analytics once they are defined.
                                                                   :datalake_store_filesystem_endpoint_suffix => 'N/A',
                                                                   :datalake_analytics_catalog_and_job_endpoint_suffix => 'N/A'
                                                               })
  end
end