Skip to content

Commit 1740bc9

Browse files
committed
docs: 📝 🚀✨ Update README: Added token expiration ⏳ and security tips 🔒! Plus, fresh new images 🌟📸 for token setup—making things clearer and prettier! 🛠️💼
Closes microsoft#129
1 parent 2fa00e5 commit 1740bc9

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

00-course-setup/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,19 @@ Then select `Generate new token`.
3535

3636
![Generate Token](./images/generate-token.png)
3737

38-
Copy your new token that you have just created. You will now add this to your `.env` file included in this course.
38+
Instead of a token with no expiration date, we recommend creating one for limited days eg: 60 days [if done at the start of April 2025 conveniently coincides with the duration of [AI Skills fest](https://techcommunity.microsoft.com/blog/microsoftlearnblog/register-now-for-the-microsoft-ai-skills-fest/4292261?wt.mc_id=DT-MVP-500304
39+
40+
![Expiry date of token](./images/token_with_expiry_date.png)
41+
42+
Also, as an additional security measure, we can restrict the token to only be used for the `ai-agents-for-beginners` repository [[Least Privilege Principle](https://en.wikipedia.
43+
org/wiki/Principle_of_least_privilege)].
44+
45+
![Select GitHub repository](./images/token_select_repositories.png)
46+
47+
Finally, select the **Models** scope under Permissions and the `Read-only` access.
48+
![Select Models Marketplace](./images/token_chose_permission.png)
49+
50+
Please copy your new token that you have just created, and set it as your `GITHUB_TOKEN` in your `.env` file you have created from `.env-sample` in this course.
3951

4052
## Add this to your Environment Variables
4153

@@ -47,7 +59,8 @@ cp .env.example .env
4759

4860
This will copy the example file and create a `.env` in your directory, fill in the values for the environment variables. You can locate the values for each environment variable in the following locations of the [Azure AI Foundry](https://ai.azure.com?WT.mc_id=academic-105485-koreyst) portal:
4961

50-
Open that file and paste the token you created into the `GITHUB_TOKEN=` field of the .env file.
62+
Open that file and paste the token you created into the `GITHUB_TOKEN=` field of the .env file.
63+
5164
- `AZURE_SUBSCRIPTION_ID` - On the **Overview** page of your project within **Project details**.
5265
- `AZURE_AI_PROJECT_NAME` - At the top of the **Overview** page for your project.
5366
- `AZURE_OPENAI_RESOURCE_GROUP` - On the **Overview** page of the **Management Center** within **Project properties**.
@@ -73,7 +86,7 @@ As a security best practice, we'll use [keyless authentication](https://learn.mi
7386

7487
Next, open a terminal and run `az login` to sign in to your Azure account.
7588

76-
## Sign in to Azure
89+
## Keyless Authentication
7790

7891
Login with your Azure AI account used to provision the Azure resources.
7992

@@ -83,7 +96,7 @@ Open a new terminal and enter the following command and follow the instructions
8396

8497
Once you've logged in, select your subscription in the terminal.
8598

86-
## Access the environment variables.
99+
## Access the environment variables
87100

88101
We'll import `os` and `load_dotenv` so that you can access the environment variables.
89102

6.25 KB
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)