forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
288 changed files
with
30,989 additions
and
2,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
This file list any third-party libraries or other resources that may be | ||
distributed under licenses different than the Azure SDK for Python software. | ||
NOTICES AND INFORMATION | ||
Do Not Translate or Localize | ||
|
||
In the event that we accidentally failed to list a required notice, please | ||
bring it to our attention by opening an issue. | ||
This software incorporates material from third parties. Microsoft makes certain | ||
open source code available at https://3rdpartysource.microsoft.com, or you may | ||
send a check or money order for US $5.00, including the product name, the open | ||
source component name, and version number, to: | ||
|
||
The attached notices are provided for information only. | ||
Source Code Compliance Team | ||
Microsoft Corporation | ||
One Microsoft Way | ||
Redmond, WA 98052 | ||
USA | ||
|
||
Notwithstanding any other terms, you may reverse engineer this software to the | ||
extent required to debug changes to any libraries licensed under the GNU Lesser | ||
General Public License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
# Security Policy | ||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK --> | ||
|
||
## Reporting a Vulnerability | ||
## Security | ||
|
||
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <[email protected]>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). | ||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). | ||
|
||
Please do not open issues for anything you think might have a security implication. | ||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. | ||
|
||
## Reporting Security Issues | ||
|
||
**Please do not report security vulnerabilities through public GitHub issues.** | ||
|
||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). | ||
|
||
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc). | ||
|
||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). | ||
|
||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: | ||
|
||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
* Full paths of source file(s) related to the manifestation of the issue | ||
* The location of the affected source code (tag/branch/commit or direct URL) | ||
* Any special configuration required to reproduce the issue | ||
* Step-by-step instructions to reproduce the issue | ||
* Proof-of-concept or exploit code (if possible) | ||
* Impact of the issue, including how an attacker might exploit the issue | ||
|
||
This information will help us triage your report more quickly. | ||
|
||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. | ||
|
||
## Preferred Languages | ||
|
||
We prefer all communications to be in English. | ||
|
||
## Policy | ||
|
||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd). | ||
|
||
<!-- END MICROSOFT SECURITY.MD BLOCK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
# ------------------------------------ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# ------------------------------------ | ||
import os | ||
from azure.identity import DefaultAzureCredential, KnownAuthorities | ||
from azure.identity import AzureAuthorityHosts, DefaultAzureCredential | ||
|
||
|
||
class KeyVaultBase: | ||
credential_type = DefaultAzureCredential | ||
host_alias_map = { | ||
'AzureChinaCloud': KnownAuthorities.AZURE_CHINA, | ||
'AzureGermanCloud': KnownAuthorities.AZURE_GERMANY, | ||
'AzureUSGovernment': KnownAuthorities.AZURE_GOVERNMENT, | ||
'AzureCloud': KnownAuthorities.AZURE_PUBLIC_CLOUD, | ||
"AzureChinaCloud": (AzureAuthorityHosts.AZURE_CHINA, "2016-10-01"), | ||
"AzureGermanCloud": (AzureAuthorityHosts.AZURE_GERMANY, "2016-10-01"), | ||
"AzureUSGovernment": (AzureAuthorityHosts.AZURE_GOVERNMENT, "2016-10-01"), | ||
"AzureCloud": (AzureAuthorityHosts.AZURE_PUBLIC_CLOUD, "7.1"), | ||
} | ||
|
||
# Instantiate a default credential based on the credential_type | ||
def get_default_credential(self, authority_host_alias=None): | ||
alias = authority_host_alias or os.environ.get("AZURE_CLOUD") | ||
authority_host = self.host_alias_map.get(alias, KnownAuthorities.AZURE_PUBLIC_CLOUD) | ||
return self.credential_type(authority=authority_host) | ||
def get_client_args(self, authority_host_alias=None): | ||
alias = authority_host_alias or os.environ.get("AZURE_CLOUD", "AzureCloud") | ||
authority_host, api_version = self.host_alias_map[alias] | ||
credential = self.credential_type(authority=authority_host) | ||
return {"api_version": api_version, "credential": credential, "vault_url": os.environ["AZURE_PROJECT_URL"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# ------------------------------------ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# ------------------------------------ | ||
from key_vault_base import KeyVaultBase | ||
from azure.identity.aio import DefaultAzureCredential | ||
|
||
|
||
class KeyVaultBaseAsync(KeyVaultBase): | ||
credential_type = DefaultAzureCredential |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.