diff --git a/00-course-setup/README.md b/00-course-setup/README.md index c6fdf51feb..37116e9573 100644 --- a/00-course-setup/README.md +++ b/00-course-setup/README.md @@ -52,23 +52,35 @@ We recommend creating a Python virtual environment to avoid any conflicts and is ### Step 1: Retrieve Your GitHub Personal Access Token (PAT) -Currently, this course uses the GitHub Models Marketplace to offer free access to Large Language Models (LLMs) that will be used to create AI Agents. +This course leverages the GitHub Models Marketplace, providing free access to Large Language Models (LLMs) that you will use to build AI Agents. -To access this service, you will need to create a GitHub Personal Access Token. +To use the GitHub Models, you will need to create a [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). This can be done by going to your Personal Access Tokens settings in your GitHub Account. -Select the `Fine-grained tokens` option on the left side of your screen. +Please follow the [Principle of Least Privilege](https://docs.github.com/en/get-started/learning-to-code/storing-your-secrets-safely) when creating your token. This means you should only give the token the permissions it needs to run the code samples in this course. -Then select `Generate new token`. +1. Select the `Fine-grained tokens` option on the left side of your screen. -![Generate Token](./images/generate-token.png) + Then select `Generate new token`. -You will be prompted to enter a name for your token, select the expiration date (Recommended: 30 Days), and select the scopes for your token (Public Repositories). + ![Generate Token](./images/generate-new-token.png) -It's also necessary to edit the permissions of this token: Permissions -> Models -> Allows access to GitHub Models +1. Enter a descriptive name for your token that reflects its purpose, making it easy to identify later. Set an expiration date (recommended: 30 days; you can choose a shorter period like 7 days if you prefer a more secure posture.) -Copy your new token that you have just created. You will now add this to your `.env` file included in this course. + ![Token Name and Expiration](./images/token-name-expiry-date.png) + +1. Limit the token's scope to your fork of this repository. + + ![Limit scope to fork repository](./images/select-fork-repository.png) + +1. Restrict the token's permissions: Under **Permissions**, toggle **Account Permissions**, traverse to **Models** and enable only the read-access required for GitHub Models. + + ![Account Permissions](./images/account-permissions.png) + + ![Models Read Access](./images/models-read-access.png) + +Copy your new token that you have just created. You will now add this to your `.env` file included in this course. ### Step 2: Create Your `.env` File @@ -113,7 +125,7 @@ With your token copied, open the `.env` file in your favorite text editor and pa ### Step 3: Sign in to Azure -As a security best practice, we'll use [keyless authentication](https://learn.microsoft.com/azure/developer/ai/keyless-connections?tabs=csharp%2Cazure-cli?WT.mc_id=academic-105485-koreyst) to authenticate to Azure OpenAI with Microsoft Entra ID. Before you can do so, you'll first need to install the **Azure CLI** per the [installation instructions](https://learn.microsoft.com/cli/azure/install-azure-cli?WT.mc_id=academic-105485-koreyst) for your operating system. +As a security best practice, we'll use [keyless authentication](https://learn.microsoft.com/azure/developer/ai/keyless-connections?tabs=csharp%2Cazure-cli?WT.mc_id=academic-105485-koreyst) to authenticate to Azure OpenAI with Microsoft Entra ID. Next, open a terminal and run `az login --use-device-code` to sign in to your Azure account. diff --git a/00-course-setup/images/account-permissions.png b/00-course-setup/images/account-permissions.png new file mode 100644 index 0000000000..6e50b6b5ce Binary files /dev/null and b/00-course-setup/images/account-permissions.png differ diff --git a/00-course-setup/images/generate-new-token.png b/00-course-setup/images/generate-new-token.png new file mode 100644 index 0000000000..ca2fb66664 Binary files /dev/null and b/00-course-setup/images/generate-new-token.png differ diff --git a/00-course-setup/images/generate-token.png b/00-course-setup/images/generate-token.png index 3c7d654108..05de423efe 100644 Binary files a/00-course-setup/images/generate-token.png and b/00-course-setup/images/generate-token.png differ diff --git a/00-course-setup/images/models-read-access.png b/00-course-setup/images/models-read-access.png new file mode 100644 index 0000000000..ea1ac3af2c Binary files /dev/null and b/00-course-setup/images/models-read-access.png differ diff --git a/00-course-setup/images/select-fork-repository.png b/00-course-setup/images/select-fork-repository.png new file mode 100644 index 0000000000..6b9e1d7e45 Binary files /dev/null and b/00-course-setup/images/select-fork-repository.png differ diff --git a/00-course-setup/images/token-name-expiry-date.png b/00-course-setup/images/token-name-expiry-date.png new file mode 100644 index 0000000000..516be3a204 Binary files /dev/null and b/00-course-setup/images/token-name-expiry-date.png differ diff --git a/00-course-setup/images/token_chose_permission.png b/00-course-setup/images/token_chose_permission.png new file mode 100644 index 0000000000..73c22221ee Binary files /dev/null and b/00-course-setup/images/token_chose_permission.png differ diff --git a/00-course-setup/images/token_select_repositories.png b/00-course-setup/images/token_select_repositories.png new file mode 100644 index 0000000000..e9243b5df9 Binary files /dev/null and b/00-course-setup/images/token_select_repositories.png differ diff --git a/00-course-setup/images/token_with_expiry_date.png b/00-course-setup/images/token_with_expiry_date.png new file mode 100644 index 0000000000..8cf5ce7d87 Binary files /dev/null and b/00-course-setup/images/token_with_expiry_date.png differ