Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions _contentTemplates/common/nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@ Visit <a href="https://status.telerik.com" target="_blank">status.telerik.com</a
#end

#generate-nuget-key
1. Go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
As the Telerik NuGet server requires authentication, the first step is to obtain an API key that you will use instead of a password. Using an API key instead of a password is a more secure approach, especially when working with [.NET CLI]({% slug nuget-dotnet-cli %}) or the [`NuGet.Config` file]({% slug nuget-config %}).

1. Select the **DOWNLOADS** tab and then **Manage NuGet Keys**.
1. Go to the [NuGet Keys](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
1. Click **Generate New Key +**.

![Manage NuGet Keys](../../installation/images/manage-nuget-keys.png)
![Manage NuGet Keys](/installation/images/account-generate-nuget-api-key.png)

1. To create a new key, select the **Generate New Key** button.
1. In the **Key Note** field, add a note that describes the API key.
1. Click **Generate Key**.
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **NuGet Keys** page displays only a portion of the key.
1. Store the generated NuGet API key as you will need it in the next steps. Whenever you need to authenticate your system with the Telerik NuGet server, use `api-key` as the username and your generated API key as the password.

1. Enter a name for the NuGet Key, and then select **Generate Key**.

1. To copy the key, select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **NuGet Keys** page displays only a portion of the key.

![Copy Generated NuGet Key](../../installation/images/copy-nuget-key.png)

1. Store the generated NuGet API key as you will need it in the next step.
#end
8 changes: 5 additions & 3 deletions get-started/first-steps-vs-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ If you encounter any issues creating the basic project, see the complete guide i

Telerik maintains a NuGet feed with official UI for .NET MAUI releases and service packs. These packages are available for registered users with an active trial or commercial license. Adding the Telerik NuGet server as a source lets you download and install Telerik packages containing controls and utilities. As Visual Studio Code does not offer a built-in NuGet packet manager, use .NET CLI to add a new package source.

To add the Telerik NuGet source using .NET CLI, use the command below. Replace the placeholders with your Telerik account user name and password.
@[template](/_contentTemplates/common/nuget.md#generate-nuget-key)

Next, use the command below to add the Telerik NuGet source using .NET CLI. Replace the NuGet API key placeholder with the API key that you generated.

```bash
dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNuGetFeed --username <TELERIK EMAIL> --password <TELERIK PASSWORD> --store-password-in-clear-text
dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNuGetFeed --username api-key --password <YOUR-NUGET-API-KEY> --store-password-in-clear-text
```

>caution Storing passwords in plain text is strongly discouraged. This guide uses the `--store-password-in-clear-text` only for simplicity. For real-world scenarios, use secure methods, such as encrypted passwords or API keys. See <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#security-best-practices-for-managing-credentials" target="_blank">Microsoft's security best practices</a> for more information on how to securely store your NuGet source credentials.
>See <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#security-best-practices-for-managing-credentials" target="_blank">Microsoft's security best practices</a> for more information on how to securely store your NuGet source credentials.

## Step 4: Install the Telerik UI for .NET MAUI Controls

Expand Down
9 changes: 5 additions & 4 deletions get-started/first-steps-vs.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ If you encounter any issues creating the basic project, see the complete guide i

Telerik maintains a NuGet feed with official UI for .NET MAUI releases and service packs. These packages are available for registered users with an active trial or commercial license. Adding the Telerik NuGet server as a source in Visual Studio lets you download and install Telerik packages containing controls and utilities.

To add the Telerik NuGet source to Visual Studio:
@[template](/_contentTemplates/common/nuget.md#generate-nuget-key)

Next, add the Telerik NuGet source to Visual Studio:

1. In Visual Studio go to **Tools** > **NuGet Package Manager** > **Package Manager Settings**.

Expand All @@ -61,7 +63,7 @@ To add the Telerik NuGet source to Visual Studio:

1. Add the `https://nuget.telerik.com/v3/index.json` URL as a **Source**. Click **OK**.

1. Whenever Visual Studio displays a dialog to enter credentials for `nuget.telerik.com`, use your Telerik account email and password.
1. Whenever Visual Studio displays a dialog to enter credentials for `nuget.telerik.com`, use `api-key` as the username and your NuGet API key as the password.

![Add the Telerik NuGet Feed in Visual Studio](./images/telerik-nuget-feed.png)

Expand All @@ -71,8 +73,7 @@ To add the Telerik NuGet source to Visual Studio:

2. Install the Telerik UI for .NET MAUI package:

1. Select the `telerik.com` **Package source** that you [added earlier](#step-2-add-the-telerik-nuget-server). As this is a private NuGet feed, you must authenticate
with your [Telerik account](https://www.telerik.com/account/) user name and password.
1. Select the `telerik.com` **Package source** that you [added earlier](#step-2-add-the-telerik-nuget-server). As this is a private NuGet feed, you must authenticate using `api-key` as the username and [your NuGet API key](#step-3-add-the-telerik-nuget-server) as the password.

1. Select the **Browse** tab, enter `MAUI` in the search box, and then select the `Telerik.UI.for.Maui` package.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed installation/images/manage-nuget-keys.png
Binary file not shown.
Binary file added installation/images/vs-nuget-auth-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 2 additions & 11 deletions installation/nuget/nuget-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ To configure the Telerik NuGet server as a package source directly in the `nuget

## Generate a NuGet Key

Generate a NuGet API key that you will use for the authentication by the Telerik NuGet server. This approach is more secure than using your Telerik credentials in <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#credentials-in-nugetconfig-files
" target="_blank">plain text</a>.

@[template](/_contentTemplates/common/nuget.md#generate-nuget-key)

## Edit the NuGet.Config File
Expand Down Expand Up @@ -52,15 +49,9 @@ Generate a NuGet API key that you will use for the authentication by the Telerik
</configuration>
```

## Securing Your Credentials

This article does not cover the scenario of using your Telerik account credentials as <a href="https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesourcecredentials
" target="_blank">plain text</a> in the `NuGet.Config` file due to security concerns. However, you can still use the <a href="https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesourcecredentials
" target="_blank">plain text</a> approach if you must.
## Securing Your NuGet Key

>warning
>* Never hard-code Telerik account credentials or NuGet API keys in a `NuGet.Config` file in a GitHub repository, Docker image, or any location that may be accessed by unauthorized parties. A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A credentials abuse can lead to a review of the affected Telerik account.
>* If you use single sign-on (SSO) to login into your Telerik account, always use a [NuGet API key]({%slug nuget-keys%}) instead of plain text credentials in the `NuGet.Config` file.
Never hard-code NuGet API keys in a `NuGet.Config` file in a GitHub repository, Docker image, or any location that may be accessed by unauthorized parties. A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A credentials abuse can lead to a review of the affected Telerik account.

For more details about the `NuGet.Config` file, see the following Microsoft resources:
* <a href="https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesources" target="_blank">Configuring the NuGet package sources</a>
Expand Down
17 changes: 5 additions & 12 deletions installation/nuget/nuget-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,15 @@ position: 8

This article describes how to use token-based authentication for the Telerik NuGet feed. You will learn how to create and use NuGet API keys to restore Telerik NuGet packages in your Continuous Integration (CI) workflow.

The Telerik NuGet server allows you to authenticate by using two methods:

* Basic authentication by providing your Telerik user name and password.
* Token-based authentication by providing a NuGet key (recommended).

When you need to restore Telerik NuGet packages as part of your CI, using NuGet keys is the more secure way to authenticate. This method does not require you to provide your Telerik username and password anywhere in the CI workflow.

Unlike your Telerik credentials, a NuGet Key has a limited scope and can be used only with the Telerik NuGet server. If any of your NuGet keys is compromised, you can quickly delete it and create a new one.
When you need to restore Telerik NuGet packages as part of your CI, using NuGet keys provides a secure way to authenticate. This method does not require you to provide your Telerik username and password anywhere in the CI workflow. Unlike your Telerik credentials, a NuGet Key has a limited scope and can be used only with the Telerik NuGet server. If any of your NuGet keys is compromised, you can quickly delete it and create a new one.

## Generating NuGet Keys

@[template](/_contentTemplates/common/nuget.md#generate-nuget-key)

## Storing a NuGet Key

> Never check in a NuGet Key with your source code or leave it publicly visible in plain text, for example, as a raw key value in a `nuget.config` file. A NuGet Key is valuable as bad actors can use it to access the NuGet packages that are licensed under your account. A potential key abuse can lead to a review of the affected account.
> Never check in a NuGet Key with your source code or leave it publicly visible in plain text, for example, as a raw key value in a `NuGet.Config` file. A NuGet Key is valuable, as bad actors can use it to access the NuGet packages that are licensed under your account. A potential key abuse can lead to a review of the affected account.

To protect the NuGet Key, store it as a secret environment variable. The exact steps depend on your workflow:

Expand All @@ -43,15 +36,15 @@ For more details on storing and protecting your NuGet Key, check the [Announcing

There are two popular ways to use the Telerik NuGet server in a build:

* [Using a nuget.config file with your projects](#using-a-nugetconfig-file-with-your-projects)
* [Using a NuGet.Config file with your projects](#using-a-nugetconfig-file-with-your-projects)

* [Using only CLI commands](#using-only-cli-commands)

For more information on how to use NuGet keys in a build, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.

### Using a NuGet.Config File with Your Projects

**1.** In your `nuget.config` file, set the `Username` value to `api-key` and the `ClearTextPassword` value to an environment variable name:
**1.** In your `NuGet.Config` file, set the `Username` value to `api-key` and the `ClearTextPassword` value to an environment variable name:

```xml
<configuration>
Expand All @@ -75,7 +68,7 @@ The exact steps to set the `MY_API_KEY` environment variable depend on your work

### Using .NET CLI Commands

You can use the CLI `add source` (or `update source`) command to set the credentials of a package source. This CLI approach is applicable if your CI system doesn't support default environment variable secrets or if you do not use a custom `nuget.config`.
You can use the CLI `add source` (or `update source`) command to set the credentials of a package source. This CLI approach is applicable if your CI system doesn't support default environment variable secrets or if you do not use a custom `NuGet.Config`.

* To set the credentials in Azure DevOps:

Expand Down
18 changes: 4 additions & 14 deletions installation/nuget/using-dotnet-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ If you do not use a [Visual Studio's NuGet Package manager]({% slug nuget-server

Use the `add source` or `update source` command respectively to add the new source and set the credentials required for the authentication by the Telerik NuGet server.

The command below shows one way to add the Telerik NuGet source using .NET CLI. Replace the placeholders with your Telerik account username and password.
1. [Generate a NuGet API Key]({% slug nuget-config %}#generate-a-nuget-key).
1. Add or update the Telerik NuGet source by using .NET CLI and the generated API key:

```bash
dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNuGetFeed --username <TELERIK EMAIL> --password <TELERIK PASSWORD> --store-password-in-clear-text
dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNuGetFeed --username api-key --password <THE-VALUE-OF-YOUR-API-KEY> --store-password-in-clear-text
```

>caution Storing passwords in plain text is strongly discouraged. This article uses `--store-password-in-clear-text` only for simplicity. For real-world scenarios, use secure methods, such as encrypted passwords or [API keys]({% slug nuget-config %}#generate-a-nuget-key). See <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#security-best-practices-for-managing-credentials" target="_blank">Microsoft's security best practices</a> for more information on how to securely store your NuGet source credentials.

## Using an API Key

To avoid storing your Telerik account username and password in plain text on your system, use an API key instead:

1. [Generate a NuGet API Key]({% slug nuget-config %}#generate-a-nuget-key).
1. Add or update the Telerik NuGet source by using .NET CLI and the generated API key instead of a password:

```bash
dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNuGetFeed --username api-key --password <THE-VALUE-OF-YOUR-API-KEY> --store-password-in-clear-text
```
>See <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#security-best-practices-for-managing-credentials" target="_blank">Microsoft's security best practices</a> for more information on how to securely store your NuGet source credentials.

## See Also

Expand Down
15 changes: 11 additions & 4 deletions installation/nuget/visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ Before adding the Telerik NuGet server to Visual Studio, make sure you have:
1. .NET MAUI installed on the machine. For more information on the required steps and system requirements, refer to the <a href="https://docs.microsoft.com/en-us/dotnet/maui/get-started/installation" target="_blank">official Microsoft .NET MAUI documentation</a>.
2. A commercial or trial license for Telerik .NET MAUI. Note that the Telerik NuGet server requires authentication and checks if you have a valid license.

## Step 1: Add the Telerik NuGet Package Source to Visual Studio
## Step 1: Generate an API Key

@[template](/_contentTemplates/common/nuget.md#generate-nuget-key)

## Step 2: Add the Telerik NuGet Package Source to Visual Studio

To configure the Telerik NuGet feed in Visual Studio:

Expand All @@ -30,7 +34,7 @@ To configure the Telerik NuGet feed in Visual Studio:

You have successfully added the Telerik NuGet feed as a Package source.

## Step 2: Install the Telerik UI for .NET MAUI NuGet Package
## Step 3: Install the Telerik UI for .NET MAUI NuGet Package

The next steps describe how to authenticate your local NuGet instance and display the available packages:

Expand All @@ -39,15 +43,18 @@ The next steps describe how to authenticate your local NuGet instance and displa
1. Select **Manage NuGet Packages for Solution...**.
1. Select the Telerik NuGet **Package source** from the drop-down list.
1. Click the **Browse** tab to see the available packages.
1. Enter your Telerik credentials in the Windows Authentication dialog.
1. In the authentication window, enter `api-key` in the **User name** field and the [generated API key](#step-1-generate-an-api-key) in the **Password** field.

![Windows authentication window in VS](../../installation/images/vs-nuget-auth-window.png)

1. In the Visual Studio Package Manager, you will see all packages that are licensed to your user account.
1. Search for the `Telerik.UI.for.Maui` package and select it.
1. Choose the projects which require the package.
1. Select the desired version and click **Install**.

![Manage Packages for Solutions dialog with the search field and the Telerik.UI.for.MAUI package](../../installation/images/maui-nuget.png)

## Step 3: Register the Required Handlers
## Step 4: Register the Required Handlers

To visualize the [.NET MAUI](https://www.telerik.com/maui-ui) controls, you have to register the required handlers by calling the `Telerik.Maui.Controls.Compatibility.UseTelerik` extension method inside the `Configure` method of the `MauiProgram.cs` file of your project.

Expand Down