Skip to content

Commit 43b4045

Browse files
authored
Merge pull request #108612 from IEvangelist/secUpdates
Cognitive Services: Security article updates
2 parents ad2fac3 + 1d2b0bb commit 43b4045

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

articles/cognitive-services/cognitive-services-security.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: IEvangelist
77
manager: nitinme
88
ms.service: cognitive-services
99
ms.topic: conceptual
10-
ms.date: 03/18/2020
10+
ms.date: 03/23/2020
1111
ms.author: dapine
1212
---
1313

@@ -27,7 +27,7 @@ For .NET users, consider the <a href="https://docs.microsoft.com/dotnet/framewor
2727

2828
## Authentication
2929

30-
When discussing authentication, there are several common misconceptions. Authentication and authorization are often confused for one another. Identity is also a major component in security. An identity is a collection of information about a <a href="https://en.wikipedia.org/wiki/Principal_(computer_security)" target="_blank">principal <span class="docon docon-navigate-external x-hidden-focus"></span></a>. Identity providers (IdP) provide identities to authentication services. Authentication is the act of verifying a user's identity. Authorization is the specification of access rights and privileges to resources for a given identity.
30+
When discussing authentication, there are several common misconceptions. Authentication and authorization are often confused for one another. Identity is also a major component in security. An identity is a collection of information about a <a href="https://en.wikipedia.org/wiki/Principal_(computer_security)" target="_blank">principal <span class="docon docon-navigate-external x-hidden-focus"></span></a>. Identity providers (IdP) provide identities to authentication services. Authentication is the act of verifying a user's identity. Authorization is the specification of access rights and privileges to resources for a given identity. Several of the Cognitive Services offerings, include role-based access control (RBAC). RBAC could be used to simplify some of the ceremony involved with manually managing principals. For more details, see [role-based access control for Azure resources](../role-based-access-control/overview.md).
3131

3232
For more information on authentication with subscription keys, access tokens and Azure Active Directory (AAD), see <a href="https://docs.microsoft.com/azure/cognitive-services/authentication" target="_blank">authenticate requests to Azure Cognitive Services<span class="docon docon-navigate-external x-hidden-focus"></span></a>.
3333

@@ -47,32 +47,53 @@ To set environment variables, use one the following commands - where the `ENVIRO
4747

4848
# [Command Line](#tab/command-line)
4949

50+
Create and assign persisted environment variable, given the value.
51+
5052
```CMD
5153
:: Assigns the env var to the value
52-
set ENVIRONMENT_VARIABLE_KEY=value
54+
setx ENVIRONMENT_VARIABLE_KEY="value"
55+
```
5356

57+
In a new instance of the **Command Prompt**, read the environment variable.
58+
59+
```CMD
5460
:: Prints the env var value
5561
echo %ENVIRONMENT_VARIABLE_KEY%
5662
```
5763

5864
# [PowerShell](#tab/powershell)
5965

66+
Create and assign persisted environment variable, given the value.
67+
6068
```powershell
6169
# Assigns the env var to the value
62-
$Env:ENVIRONMENT_VARIABLE_KEY="value"
70+
[System.Environment]::SetEnvironmentVariable('ENVIRONMENT_VARIABLE_KEY', 'value', 'User')
71+
```
72+
73+
In a new instance of the **Windows PowerShell**, read the environment variable.
6374

75+
```powershell
6476
# Prints the env var value
65-
$Env:ENVIRONMENT_VARIABLE_KEY
77+
[System.Environment]::GetEnvironmentVariable('ENVIRONMENT_VARIABLE_KEY')
6678
```
6779

6880
# [Bash](#tab/bash)
6981

82+
Create and assign persisted environment variable, given the value.
83+
7084
```Bash
7185
# Assigns the env var to the value
72-
export ENVIRONMENT_VARIABLE_KEY=value
86+
echo export ENVIRONMENT_VARIABLE_KEY="value" >> /etc/environment && source /etc/environment
87+
```
7388

89+
In a new instance of the **Bash**, read the environment variable.
90+
91+
```Bash
7492
# Prints the env var value
75-
echo ENVIRONMENT_VARIABLE_KEY
93+
echo "${ENVIRONMENT_VARIABLE_KEY}"
94+
95+
# Or use printenv:
96+
# printenv ENVIRONMENT_VARIABLE_KEY
7697
```
7798

7899
---

0 commit comments

Comments
 (0)