Skip to content

Commit 7d6c246

Browse files
Dess api key (#665)
* Download from the NuGet server * Polished old Nuget Keys article
1 parent e07bde4 commit 7d6c246

10 files changed

+94
-46
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Generating API Keys
3+
page_title: Generating API Keys
4+
description: Learn how to use API Keys to authenticate with the Telerik NuGet server and restore Telerik Document Processing packages in your CI or desktop environment.
5+
slug: generating-api-keys
6+
tags: telerik, document, processing, restore, nuget, packages, ci, continuous, integration, installation, api, key
7+
published: True
8+
position: 9
9+
---
10+
11+
# Generating API Keys
12+
13+
Using API Keys provides a secure way to authenticate. This method does not require you to provide your Telerik credentials anywhere. Unlike your Telerik credentials, an API key has a **limited scope** and can be used only with the Telerik NuGet server. If any of your API Keys is compromised, you can quickly delete it and create a new one.
14+
15+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
16+
17+
1. Click **Generate New Key +**.
18+
19+
![Generate API key](images/generate-api-key.png)
20+
21+
1. In the **Key Note** field, add a note that describes the API key.
22+
23+
1. Click `Generate Key`.
24+
25+
![Generate API key](images/generate-key-button.png)
26+
27+
1. Select `Copy and Close`. Once you close the window, you can no longer copy the generated key. For security reasons, the API Keys page displays only a portion of the key.
28+
29+
![Copy and Close API key](images/generated-api-key-copy-close.png)
30+
31+
>note The illustrated API key above is used just for demonstration purposes and it is not valid!
32+
33+
![Generated API key](images/generatee-api-key.png)
34+
35+
>important The validity of the API key is 2 years.
36+
37+
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.
38+
39+
## See Also
40+
41+
* [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})
42+
* [Install using NuGet Packages]({%slug installation-nuget-packages%})
33.9 KB
Loading
65.4 KB
Loading
75.5 KB
Loading
44.6 KB
Loading
912 Bytes
Loading

getting-started/Installation/install-nuget-packages.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,25 @@ This approach allows you to setup a local NuGet package source, so you can insta
4949
5050
## Download from the NuGet server
5151

52-
Before you can install Telerik NuGet packages, you must configure the Telerik NuGet server (https://nuget.telerik.com/v3/index.json) as a package source in Visual Studio:
52+
To install the Telerik Document Processing Libraries, you can use the NuGet packages hosted on the public Telerik NuGet server. This online source lets you download and install various versions of the Document Processing libraries and enables quick updates with minimal manual intervention.
53+
54+
Before adding the Telerik NuGet server to Visual Studio, make sure you have:
55+
56+
* A commercial or trial license that includes Document Processing. Note that the Telerik NuGet server requires authentication and checks if you have a valid license.
57+
58+
* Generate an API key - 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 or the NuGet.Config file.
59+
60+
### Generate an API Key
61+
62+
As the Telerik NuGet server requires authentication, the first step is to [obtain an API key]({%slug generating-api-keys%}) 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 or the NuGet.Config file.
63+
64+
### Add the Telerik NuGet Package Source to Visual Studio
65+
66+
Before you can install Telerik NuGet packages, you must configure the Telerik NuGet server as a package source in Visual Studio:
67+
68+
```
69+
https://nuget.telerik.com/v3/index.json
70+
```
5371

5472
1\. In the Visual Studio Solution Explorer, right-click a Project, select **Manage NuGet Packages...**, and then select the **Settings** icon:
5573

@@ -67,6 +85,22 @@ Before you can install Telerik NuGet packages, you must configure the Telerik Nu
6785

6886
![installation-nuget-packages 004](images/installation-nuget-packages004.png)
6987

88+
You have successfully added the Telerik NuGet feed as a Package source.
89+
90+
### Reset Store Credentials
91+
92+
If you previously stored credentials for the Telerik NuGet server, you need to reset them to be able to authenticate with your new API key. Here are the steps you need to follow:
93+
94+
1. Remove the saved credentials in the [Windows Credential Manager](https://support.microsoft.com/en-us/windows/accessing-credential-manager-1b5c916a-6a16-889f-8581-fc16e8165ac0). These credentials will appear as `nuget.telerik.com` or `VSCredentials_nuget.telerik.com` entries.
95+
2. Remove the Telerik NuGet package source from Visual Studio.
96+
3. If you have added the Telerik package source by using the .NET CLI, try to remove it by running the following commands:
97+
* [`dotnet nuget list source`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-list-source)
98+
* [`dotnet nuget remove source`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-remove-source)
99+
4. Check if you have any credentials stored in `%AppData%\NuGet\Nuget.Config`. If so, remove them.
100+
5. Try to reset the Visual Studio user data by [forcing NuGet to ask for authentication](https://stackoverflow.com/questions/43550797/how-to-force-nuget-to-ask-for-authentication-when-connecting-to-a-private-feed).
101+
6. Restart Visual Studio.
102+
7. Add the Telerik NuGet package source again through Visual Studio or .NET CLI. If you are using the Telerik NuGet feed in a .NET Core application, use a NuGet API key in the NuGet.Config file]({%slug telerik-nuget-source%}#edit-the-nugetconfig-file).
103+
70104
## See Also
71105

72106
* [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})

getting-started/Installation/nuget-keys.md

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,39 @@ title: Restoring NuGet Packages in CI
33
page_title: Restoring NuGet Packages in CI
44
description: Learn how to use NuGet Keys to authenticate with the Telerik NuGet server and restore Telerik Document Processing packages in your CI or desktop environment.
55
slug: using-nuget-keys
6-
tags: telerik, document, processing, restore, nuget, packages, ci, continuous, integration, installation
6+
tags: telerik, document, processing, restore, nuget, packages, ci, continuous, integration, installation, api, key
77
published: True
88
position: 9
99
---
1010

1111
# Restoring NuGet Packages in Your CI Workflow
1212

13-
This article provides an overview of the most popular approaches for using token-based authentication to restore Telerik NuGet packages in your CI (Continuous Integration) workflow.
13+
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.
1414

15-
The Telerik NuGet server allows you to authenticate by using two methods:
15+
When you need to restore the [Telerik NuGet packages]({%slug installation-nuget-packages%}#download-from-the-nuget-server) as part of your CI, using API Keys provides a secure way to authenticate. This method does not require you to provide your Telerik credentials anywhere in the CI workflow. An API key has a limited scope and can be used only with the Telerik NuGet server. If any of your API Keys is compromised, you can quickly delete it and create a new one.
1616

17-
* Basic authentication by providing your Telerik user name and password.
18-
* Token-based authentication by providing a NuGet Key.
17+
## Generating API Keys
1918

20-
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.
21-
22-
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.
23-
24-
## Generating NuGet Keys
25-
26-
1. Go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
27-
28-
1. Alternatively, select the **Downloads** tab from your Telerik account and then **NuGet Keys**.
29-
30-
![Manage NuGet Keys](images/manage-nuget-keys.png)
31-
32-
The **NuGet Keys** can be accessed from the **License Keys** section as well:
33-
34-
![NuGet Keys from License Keys](images/access-nuget-keys-from-license-keys.png)
35-
36-
37-
1. To create a new key, select the **Generate New Key** button.
38-
39-
1. Enter a name for the NuGet Key, and then select **Generate Key**.
40-
41-
![Generate NuGet Key](images/generate-nuget-key.png)
42-
43-
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.
44-
45-
![Copy Generated NuGet Key](images/copy-nuget-key.png)
19+
As the Telerik NuGet server requires authentication, the first step is to [obtain an API key]({%slug generating-api-keys%}) 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 or the NuGet.Config file.
4620

4721
## Storing a NuGet Key
4822

49-
> 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 could lead to a review of the affected account.
23+
> Never check-in NuGet API Keys 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 API Key is valuable as bad actors can use it to access the NuGet packages that are licensed under your account. A potential key abuse could lead to a review of the affected account.
5024
5125
To protect the NuGet Key, store it as a secret environment variable. The exact steps depend on your workflow:
5226

53-
* In GitHub Actions, save the key as a GitHub Actions Secret. Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
27+
* In GitHub Actions, save the key as a [GitHub Actions Secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions). Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
5428

55-
* In Azure DevOps Classic, save the key as a secret pipeline variable. Go to the **Variables** tab and then select **Pipeline variables**.
29+
* In Azure DevOps, save the key as a [secret Azure DevOps pipeline variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables). If you use an Azure DevOps Service connection instead of secret environment variables, enter `api-key` in the username field and the API key as the password in the **New NuGet service connection** form editor.
5630

5731
* In Azure DevOps YAML pipelines, save the key as a secret variable as well. Click the YAML editor's **Variables** button and complete the **New variable** form.
5832

59-
If you use Azure DevOps Service connection instead of secret environment variables, enter `api-key` in the username filed and the NuGet Key as the password in the **New NuGet service connection** form editor.
33+
* In Docker images, save the key as a [Docker secret](https://docs.docker.com/tags/secrets/).
6034

61-
For more details on storing and protecting your NuGet Key, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
35+
For more details on storing and protecting your API key, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
36+
The examples below assume that the secret environment variable name is `TELERIK_NUGET_KEY`.
6237

63-
## Using a NuGet Key
38+
## Using a NuGet API Key
6439

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

getting-started/Installation/nuget-packages.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ The following list represents the available NuGet packages for the Document Proc
7777
* __Telerik.Documents.SpreadsheetStreaming:__ The main package for generating huge spreadsheet files while using minimum resources.
7878
* __Telerik.Zip:__ It can be used as a standalone library as well.
7979

80-
## See Also
81-
82-
- [How to Obtain Telerik Document Processing Libraries for .NET Framework, .NET Standard, {{site.dotnetversions}}]({%slug distribute-telerik-document-processing-libraries-net-versions%})
83-
84-
8580
## See Also
8681

8782
* [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})

getting-started/Installation/telerik-nuget-source.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
119119
</packageSources>
120120
<packageSourceCredentials>
121121
<TelerikOnlineFeed>
122-
<add key="Username" value="<TELERIK EMAIL or api-key>" />
123-
<add key="ClearTextPassword" value="<TELERIK PASSWORD or NUGET API KEY>" />
122+
<add key="Username" value="api-key" />
123+
<add key="ClearTextPassword" value="Your API KEY" />
124124
</TelerikOnlineFeed>
125125
</packageSourceCredentials>
126126
</configuration>
@@ -131,7 +131,9 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
131131
There are two ways to authenticate with the Telerik NuGet server when you add the Telerik NuGet source [with the .NET CLI](#use-the-net-cli) or [edit the `NuGet.Config` file manually](#edit-the-nuget-config-file):
132132

133133
* Use your Telerik account email as the username, and your Telerik password.
134-
* Use `api-key` as the username and your personal [NuGet API Key]({%slug using-nuget-keys%}) as the password.
134+
* Use `api-key` (**recommended**) as the **username** and your personal [NuGet API Key]({%slug using-nuget-keys%}) as the password.
135+
136+
>important Using an API key minimizes the risk of exposing client credentials when configuring NuGet access. User credentials grant full access to the user account, while the API key limits access to the NuGet feed only.
135137
136138
You can [generate your Telerik NuGet API Key on telerik.com](https://www.telerik.com/account/downloads/nuget-keys). Read more about [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%}).
137139

0 commit comments

Comments
 (0)