From 85a8ec5e015bbe2f545ce6b304337b475d94b2a2 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 17 Sep 2020 15:19:26 -0700 Subject: [PATCH 1/3] Replaced relative link with absolute links and remove locale --- README.md | 6 +++--- .../pipelines/templates/steps/verify-links.yml | 2 +- examples/AzureFunctionSASTokenVendor/README.md | 16 ++++++++-------- sdk/storage/AzureStorageBlob/README.md | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 10ae3d9cb..1daebf03a 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ For your convenience, each service has a separate set of libraries that you can ### Libraries available -Currently, the client libraries are in **preview**. These libraries follow the [Azure SDK Design Guidelines for iOS](https://azure.github.io/azure-sdk/ios_introduction.html) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features in [AzureCore](sdk/core/AzureCore/README.md). +Currently, the client libraries are in **preview**. These libraries follow the [Azure SDK Design Guidelines for iOS](https://azure.github.io/azure-sdk/ios_introduction.html) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features in [AzureCore](https://github.com/Azure/azure-sdk-for-ios/blob/master/sdk/core/AzureCore/README.md). The following libraries are currently in **preview**: -- [AzureStorageBlob](sdk/storage/AzureStorageBlob) +- [AzureStorageBlob](https://github.com/Azure/azure-sdk-for-ios/blob/master/sdk/storage/AzureStorageBlob) > Note: The SDK is currently in **preview**. The API surface and feature sets are subject to change at any time before **GA**. We do not currently recommend them for production use. @@ -54,7 +54,7 @@ following the library's Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (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. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). ## Contributing -For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-ios/blob/master/CONTRIBUTING.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index eaa2dd142..b23a266cc 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -4,7 +4,7 @@ parameters: WorkingDirectory: '$(System.DefaultWorkingDirectory)' ScriptDirectory: 'eng/common/scripts' Recursive: $false - CheckLinkGuidance: $false + CheckLinkGuidance: $true Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)' BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}.*/(?:blob|tree)/)master(/.*)$" BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}" diff --git a/examples/AzureFunctionSASTokenVendor/README.md b/examples/AzureFunctionSASTokenVendor/README.md index ca1495a03..5ed5a01c5 100644 --- a/examples/AzureFunctionSASTokenVendor/README.md +++ b/examples/AzureFunctionSASTokenVendor/README.md @@ -9,7 +9,7 @@ a per-client path prefix within a Storage Container. This project provides examples for the following scenarios: * Using the - [Azure Functions Python Runtime](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli?pivots=programming-language-python) + [Azure Functions Python Runtime](https://docs.microsoft.com/azure/azure-functions/functions-create-first-azure-function-azure-cli?pivots=programming-language-python) to host an API endpoint which generates scoped Blob Storage SAS tokens for client applications. @@ -22,22 +22,22 @@ This project provides examples for the following scenarios: ### Prerequisites * You must have the - [Azure Functions Core Tools version 3.x](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#v2) installed to run this example. + [Azure Functions Core Tools version 3.x](https://docs.microsoft.com/azure/azure-functions/functions-run-local#v2) installed to run this example. * This example is written in Python. Because version 3.x of the Azure Functions Core Runtime supports Python 3.8+ only, you must have [Python 3.8](https://www.python.org/downloads/) or higher installed to run this example. * You must have an [Azure subscription](https://azure.microsoft.com/free/), an active - [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create), - and a [blob container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) + [storage account](https://docs.microsoft.com/azure/storage/common/storage-account-create), + and a [blob container](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) within that storage account to run this example. ### Installation 1. If you don't already have it, [install Python](https://www.python.org/downloads/) and the - [Azure Functions Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#v2). + [Azure Functions Core Tools](https://docs.microsoft.com/azure/azure-functions/functions-run-local#v2). This example is compatible with Python 3.8 and higher and Azure Functions Core Tools 3.x. @@ -65,9 +65,9 @@ This project provides examples for the following scenarios: python3 -m pip install -r requirements.txt ``` -3. Edit the [`local.settings.json`](local.settings.json) file to include your +3. Edit the [`https://github.com/Azure/azure-sdk-for-ios/blob/master/examples/AzureFunctionSASTokenVendor/local.settings.json`](https://github.com/Azure/azure-sdk-for-ios/blob/master/examples/AzureFunctionSASTokenVendor/local.settings.json) file to include your storage account name, - [storage account access key](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage#view-account-access-keys), + [storage account access key](https://docs.microsoft.com/azure/storage/common/storage-account-keys-manage#view-account-access-keys), and blob container name: ```json { @@ -125,7 +125,7 @@ authenticate a PUT request (upload) to that path: ### Authenticating a StorageBlobClient with a StorageSASCredential Deploy the example function to Azure following the -[Quickstart guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli?pivots=programming-language-python#create-supporting-azure-resources-for-your-function). +[Quickstart guide](https://docs.microsoft.com/azure/azure-functions/functions-create-first-azure-function-azure-cli?pivots=programming-language-python#create-supporting-azure-resources-for-your-function). The publish command shows results similar to the following output (truncated for simplicity): ``` diff --git a/sdk/storage/AzureStorageBlob/README.md b/sdk/storage/AzureStorageBlob/README.md index e88866dc0..0c45c4aa6 100644 --- a/sdk/storage/AzureStorageBlob/README.md +++ b/sdk/storage/AzureStorageBlob/README.md @@ -114,9 +114,9 @@ You can generate a SAS token from the Azure Portal under "Settings" > "Shared ac signature" (account-scoped) or by right-clicking a blob within a container and selecting "Generate SAS" (blob-scoped). You can also generate account-, container-, and blob-scoped SAS tokens using Azure Storage Explorer by right-clicking the desired resource and selecting "Get Shared Access Signature...", or using the Azure CLI -([account](https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-generate-sas), -[container](https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-generate-sas), -[blob](https://docs.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-generate-sas)). +([account](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-generate-sas), +[container](https://docs.microsoft.com/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-generate-sas), +[blob](https://docs.microsoft.com/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-generate-sas)). Because SAS tokens can be limited in scope and permissions, `StorageSASCredential` is unique in that it is initialized with a closure that will be called each time its `StorageBlobClient` needs a new token to authenticate a request. Within @@ -211,13 +211,13 @@ let client = try StorageBlobClient(endpoint: endpointUrl, credential: msalCreden ``` ##### Storage account shared access key -To use a [shared access key](https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key), +To use a [shared access key](https://docs.microsoft.com/rest/api/storageservices/authorize-with-shared-key), you'll create a `StorageSharedKeyCredential` using the storage account connection string, or a combination of the account name and access key. You can find the connection string and access keys for your storage account in the Azure Portal under "Settings" > "Access keys", in Azure Storage Explorer located in the storage account's "Properties" pane, or using the Azure CLI -([connection string](https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show-connection-string), -[access keys](https://docs.microsoft.com/en-us/cli/azure/storage/account/keys?view=azure-cli-latest#az-storage-account-keys-list)). +([connection string](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show-connection-string), +[access keys](https://docs.microsoft.com/cli/azure/storage/account/keys?view=azure-cli-latest#az-storage-account-keys-list)). > **WARNING**: Shared keys are inherently insecure in end-user facing applications such as mobile and desktop apps. > Shared keys provide full access to an entire storage account and should not be shared with end users. Since mobile and From 2004ec636f25546de5346460c5ee17cc9a5c9b3d Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 17 Sep 2020 18:15:09 -0700 Subject: [PATCH 2/3] Enable the feature on client yml --- eng/common/pipelines/templates/steps/verify-links.yml | 2 +- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index b23a266cc..eaa2dd142 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -4,7 +4,7 @@ parameters: WorkingDirectory: '$(System.DefaultWorkingDirectory)' ScriptDirectory: 'eng/common/scripts' Recursive: $false - CheckLinkGuidance: $true + CheckLinkGuidance: $false Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)' BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}.*/(?:blob|tree)/)master(/.*)$" BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}" diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 82e373fe0..441b2e552 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -59,6 +59,7 @@ jobs: - template: ../../../common/pipelines/templates/steps/verify-links.yml parameters: Directory: "" + CheckLinkGuidance: $true - script: | brew install swiftlint From 27c1d9628b704f3f437a0d1f27481c0435a4a0af Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 17 Sep 2020 22:07:06 -0700 Subject: [PATCH 3/3] Fixed relative links --- README.md | 6 +++--- examples/AzureFunctionSASTokenVendor/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1818f5eeb..02a37e9d8 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ For your convenience, each service has a separate set of libraries that you can ### Libraries available -Currently, the client libraries are in **beta**. These libraries follow the [Azure SDK Design Guidelines for iOS](https://azure.github.io/azure-sdk/ios_introduction.html) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features in [AzureCore](sdk/core/AzureCore/README.md). +Currently, the client libraries are in **beta**. These libraries follow the [Azure SDK Design Guidelines for iOS](https://azure.github.io/azure-sdk/ios_introduction.html) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features in [AzureCore](https://github.com/Azure/azure-sdk-for-ios/blob/master/sdk/core/AzureCore/README.md). The following libraries are currently in **beta**: -- [AzureCore](sdk/core/AzureCore): 1.0.0-beta.1 +- [AzureCore](https://github.com/Azure/azure-sdk-for-ios/blob/master/sdk/core/AzureCore/): 1.0.0-beta.1 > Note: The SDK is currently in **beta**. The API surface and feature sets are subject to change at any time before **GA**. We do not currently recommend them for production use. @@ -114,7 +114,7 @@ $ pod install Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (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. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). ## Contributing -For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-ios/blob/master/CONTRIBUTING.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/examples/AzureFunctionSASTokenVendor/README.md b/examples/AzureFunctionSASTokenVendor/README.md index 5ed5a01c5..a498d0eb3 100644 --- a/examples/AzureFunctionSASTokenVendor/README.md +++ b/examples/AzureFunctionSASTokenVendor/README.md @@ -65,7 +65,7 @@ This project provides examples for the following scenarios: python3 -m pip install -r requirements.txt ``` -3. Edit the [`https://github.com/Azure/azure-sdk-for-ios/blob/master/examples/AzureFunctionSASTokenVendor/local.settings.json`](https://github.com/Azure/azure-sdk-for-ios/blob/master/examples/AzureFunctionSASTokenVendor/local.settings.json) file to include your +3. Edit the [`local.settings.json`](https://github.com/Azure/azure-sdk-for-ios/blob/master/examples/AzureFunctionSASTokenVendor/local.settings.json) file to include your storage account name, [storage account access key](https://docs.microsoft.com/azure/storage/common/storage-account-keys-manage#view-account-access-keys), and blob container name: