Skip to content

Commit ddf0c9b

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 9183193 commit ddf0c9b

File tree

12 files changed

+364
-7
lines changed

12 files changed

+364
-7
lines changed

docs-aspnet/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ troubleshoot/troubleshooting-scaffolding.md,
3535
vs-integration/create-kendo-professional-project.md,
3636
vs-integration/upgrade-api-analyzer.md,
3737
vs-integration/upgrade-wizard.md,
38+
installation/nuget-keys.md,
3839
asp-net-mvc-3.md,
3940
asp-net-mvc-4.md,
4041
html-helpers/helper-basics/fundamentals-mvc.md,

docs-aspnet/deployment/ci-cd-build-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Often enough, you would want to set up Continuous Integration and/or Continuous
2323

2424
There are a couple of common ways people implement CI/CD automated builds.
2525

26-
* You can put your own credentials (or the credentials of the license holder, depending on how your licenses are set up) in the `nuget.config` of the build machine/pipeline. In many cases, when doing so, they will even be encrypted when you add the Telerik feed source through the CLI. Alternatively, you can copy an encrypted version from your own local config if you have one and if plain text is an issue. See more on setting up the [Telerik Private NuGet feed]({%slug nuget_install_aspnetmvc6_aspnetmvc%}).
26+
* You can [restore the Telerik NuGet packages]({%slug nuget_keys%}) by downloading them from the Telerik NuGet server. You can achieve this by using the more secure token-based authentication with the Telerik NuGet server. If you prefer the basic authentication with a username and password, you can use your own credentials (or the credentials of the license holder, depending on how your licenses are set up) in the `nuget.config` of the build machine/pipeline. In this case, make sure that your credentials are encrypted when you add the Telerik feed source through the CLI. Alternatively, you can copy an encrypted version from your own local config if you have one. See more on setting up the [Telerik Private NuGet feed]({%slug nuget_install_aspnetmvc6_aspnetmvc%}).
2727

2828
* Creating a local folder (for example, on a shared network drive or other suitable location accessible only by your builds and team) that holds the `.nupkg` files we provide (you can download them from your telerik.com account, or from your local installation - both [automated]({%slug msi_install_aspnetmvc6_aspnetmvc%}) and from the zip archive).
2929

docs-aspnet/deployment/nuget-keys.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Restoring NuGet Packages in CI
3+
page_title: Restoring NuGet Packages in CI
4+
description: "Get started with {{ site.product }} and use NuGet Keys to authenticate with the Telerik NuGet server and restore packages in your CI or desktop environment."
5+
slug: nuget_keys
6+
position: 10
7+
---
8+
9+
# Restoring NuGet Packages in Your CI Workflow
10+
11+
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.
12+
13+
The Telerik NuGet server allows you to authenticate by using two methods:
14+
15+
* Basic authentication by providing your Telerik user name and password.
16+
* Token-based authentication by providing a NuGet Key.
17+
18+
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.
19+
20+
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.
21+
22+
## Generating NuGet Keys
23+
24+
1. Go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
25+
26+
![Manage NuGet Keys](../images/manage-nuget-keys.png)
27+
28+
1. To create a new key, select the **Generate New Key** button.
29+
30+
1. Enter a name for the NuGet Key, and then select **Generate Key**.
31+
32+
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.
33+
34+
![Copy Generated NuGet Key](../images/copy-nuget-key.png)
35+
36+
## Storing a NuGet Key
37+
38+
> 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.
39+
40+
To protect the NuGet Key, store it as a secret environment variable. The exact steps depend on your workflow:
41+
42+
* In GitHub Actions, save the key as a GitHub Actions Secret. Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
43+
44+
* In Azure DevOps Classic, save the key as a secret pipeline variable. Go to the **Variables** tab and then select **Pipeline variables**.
45+
46+
* 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.
47+
48+
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.
49+
50+
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.
51+
52+
## Using a NuGet Key
53+
54+
There are two popular ways to use the Telerik NuGet server in a build:
55+
56+
* [Using a nuget.config file with your projects](#using-a-nugetconfig-file-with-your-projects)
57+
58+
* [Using only CLI commands](#using-only-cli-commands)
59+
60+
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.
61+
62+
### Using a nuget.config File with Your Projects
63+
64+
1. In your `nuget.config` file, set the `Username` value to `api-key` and the `ClearTextPassword` value to an environment variable name:
65+
66+
```xml
67+
<configuration>
68+
<packageSources>
69+
<clear/>
70+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
71+
<add key="MyTelerikFeed" value="https://nuget.telerik.com/v3/index.json" protocolVersion="3"/>
72+
</packageSources>
73+
<packageSourceCredentials>
74+
<MyTelerikFeed>
75+
<add key="Username" value="api-key" />
76+
<add key="ClearTextPassword" value="%MY_API_KEY%" />
77+
</MyTelerikFeed>
78+
</packageSourceCredentials>
79+
...
80+
</configuration>
81+
```
82+
83+
1. Set the `MY_API_KEY` environment variable by using the value of your pipeline/workflow secret.
84+
85+
The exact steps to set the `MY_API_KEY` environment variable depend on your workflow. For more details, refer to the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
86+
87+
### Using Only CLI Commands
88+
89+
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`.
90+
91+
* To set the credentials in Azure DevOps:
92+
93+
```
94+
dotnet nuget add source 'MyTelerikFeed' --source 'https://nuget.telerik.com/v3/index.json' --username 'api-key' --password '$(TELERIK_NUGET_KEY)' --configfile './nuget.config' --store-password-in-clear-text
95+
```
96+
97+
* To set the credentials in GitHub Actions:
98+
99+
```
100+
dotnet nuget add source 'MyTelerikFeed' --source 'https://nuget.telerik.com/v3/index.json' --username 'api-key' --password '${{ secrets.TELERIK_NUGET_KEY }}' --configfile './nuget.config' --store-password-in-clear-text
101+
```
102+
103+
## Additional Resources
104+
105+
If you just start using the Telerik NuGet server in your CI or inter-department workflows, check the two blog posts below. You will learn about the various use cases and find practical implementation details.
106+
107+
* [Azure DevOps and Telerik NuGet Packages](https://www.telerik.com/blogs/azure-devops-and-telerik-nuget-packages)
108+
109+
* [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys)
110+
111+
## See Also
112+
113+
* [Set Up Private NuGet Feed for Azure](https://docs.telerik.com/aspnet-core/knowledge-base/setup-private-nuget-feed-azure)
114+
115+
* [Including Client-Side Resources]({% slug copyclientresources_aspnetmvc6_aspnetmvc %})
116+
117+
* [Scaffolding the Telerik UI for ASP.NET Core Project]({% slug scaffolding_aspnetcore %})

docs-aspnet/deployment/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deployment Troubleshooting
33
page_title: Deployment Troubleshooting
44
description: Troubleshooting deployment issues involving the UI for ASP.NET Core suite.
55
slug: deployment_troubleshooting
6-
position: 2
6+
position: 20
77
---
88

99
# Deployment Troubleshooting

docs-aspnet/html-helpers/editors/editor/pdf-export.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ position: 13
1010

1111
The Telerik UI Editor for {{ site.framework }} comes with a built-in option to export its content to PDF. To enable the PDF export, add the `Pdf` tool to the widget' toolbox:
1212

13-
````HtmlHelper
13+
```HtmlHelper
1414
@(Html.Kendo().Editor()
1515
.Name("editor")
1616
.Tools(tools => tools
1717
.Pdf()
1818
)
1919
)
20-
````
20+
```
2121
{% if site.core %}
2222
```TagHelper
2323
<kendo-editor name="editor">
@@ -31,7 +31,7 @@ The Telerik UI Editor for {{ site.framework }} comes with a built-in option to e
3131

3232
Customizations such as file name, font size, export of all pages can be added to the [`Pdf`](/api/Kendo.Mvc.UI.Fluent/EditorPdfSettingsBuilder) option of the widget:
3333

34-
````HtmlHelper
34+
```HtmlHelper
3535
@(Html.Kendo().Editor()
3636
.Name("editor")
3737
.Pdf(pdf => pdf
@@ -44,7 +44,7 @@ Customizations such as file name, font size, export of all pages can be added to
4444
.Pdf()
4545
)
4646
)
47-
````
47+
```
4848
{% if site.core %}
4949
```TagHelper
5050
<kendo-editor name="editor">

docs-aspnet/images/copy-nuget-key.png

8.27 KB
Loading
18 KB
Loading

docs-aspnet/installation/npm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Installing with NPM
33
page_title: Installing with NPM
4-
description: "Get started with Telerik UI for ASP.NET Core and install NPM packages of the helpers."
4+
description: "Get started with {{ site.product }} and install NPM packages of the helpers."
55
previous_url: /getting-started/installation/npm
66
slug: npmpackages_core
77
position: 9
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: Restoring NuGet Packages in CI
3+
page_title: Restoring NuGet Packages in CI
4+
description: "Get started with Telerik UI for ASP.NET MVC and use NuGet Keys to authenticate with the Telerik NuGet server and restore packages in your CI or desktop environment."
5+
slug: nuget_keys
6+
position: 25
7+
---
8+
9+
# Restoring NuGet Packages in Your CI Workflow
10+
11+
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.
12+
13+
The Telerik NuGet server allows you to authenticate by using two methods:
14+
15+
* Basic authentication by providing your Telerik user name and password.
16+
* Token-based authentication by providing a NuGet Key.
17+
18+
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.
19+
20+
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.
21+
22+
## Generating NuGet Keys
23+
24+
1. Go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
25+
26+
1. Select the **DOWNLOADS** tab and then **Manage NuGet Keys**.
27+
28+
![Manage NuGet Keys](../images/manage-nuget-keys.png)
29+
30+
1. To create a new key, select the **Generate New Key** button.
31+
32+
1. Enter a name for the NuGet Key, and then select **Generate Key**.
33+
34+
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.
35+
36+
![Copy Generated NuGet Key](../images/copy-nuget-key.png)
37+
38+
## Storing a NuGet Key
39+
40+
> 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.
41+
42+
To protect the NuGet Key, store it as a secret environment variable. The exact steps depend on your workflow:
43+
44+
* In GitHub Actions, save the key as a GitHub Actions Secret. Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
45+
46+
* In Azure DevOps Classic, save the key as a secret pipeline variable. Go to the **Variables** tab and then select **Pipeline variables**.
47+
48+
* 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.
49+
50+
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.
51+
52+
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.
53+
54+
## Using a NuGet Key
55+
56+
There are two popular ways to use the Telerik NuGet server in a build:
57+
58+
* [Using a nuget.config file with your projects](#using-a-nugetconfig-file-with-your-projects)
59+
60+
* [Using only CLI commands](#using-only-cli-commands)
61+
62+
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.
63+
64+
### Using a nuget.config File with Your Projects
65+
66+
1. In your `nuget.config` file, set the `Username` value to `api-key` and the `ClearTextPassword` value to an environment variable name:
67+
68+
```xml
69+
<configuration>
70+
<packageSources>
71+
<clear/>
72+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
73+
<add key="MyTelerikFeed" value="https://nuget.telerik.com/v3/index.json" protocolVersion="3"/>
74+
</packageSources>
75+
<packageSourceCredentials>
76+
<MyTelerikFeed>
77+
<add key="Username" value="api-key" />
78+
<add key="ClearTextPassword" value="%MY_API_KEY%" />
79+
</MyTelerikFeed>
80+
</packageSourceCredentials>
81+
...
82+
</configuration>
83+
```
84+
85+
1. Set the `MY_API_KEY` environment variable by using the value of your pipeline/workflow secret.
86+
87+
The exact steps to set the `MY_API_KEY` environment variable depend on your workflow. For more details, refer to the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
88+
89+
### Using Only CLI Commands
90+
91+
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`.
92+
93+
* To set the credentials in Azure DevOps:
94+
95+
```
96+
dotnet nuget add source 'MyTelerikFeed' --source 'https://nuget.telerik.com/v3/index.json' --username 'api-key' --password '$(TELERIK_NUGET_KEY)' --configfile './nuget.config' --store-password-in-clear-text
97+
```
98+
99+
* To set the credentials in GitHub Actions:
100+
101+
```
102+
dotnet nuget add source 'MyTelerikFeed' --source 'https://nuget.telerik.com/v3/index.json' --username 'api-key' --password '${{ secrets.TELERIK_NUGET_KEY }}' --configfile './nuget.config' --store-password-in-clear-text
103+
```
104+
105+
## Additional Resources
106+
107+
If you just start using the Telerik NuGet server in your CI or inter-department workflows, check the two blog posts below. You will learn about the various use cases and find practical implementation details.
108+
109+
* [Azure DevOps and Telerik NuGet Packages](https://www.telerik.com/blogs/azure-devops-and-telerik-nuget-packages)
110+
111+
* [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys)
112+
113+
## See Also
114+
115+
* [Set Up Private NuGet Feed for Azure](https://docs.telerik.com/aspnet-core/knowledge-base/setup-private-nuget-feed-azure)
116+
117+
* [Including Client-Side Resources]({% slug copyclientresources_aspnetmvc6_aspnetmvc %})
118+
119+
* [Scaffolding the Telerik UI for ASP.NET MVC Project]({% slug scaffolding_aspnetcore %})

docs/images/copy-nuget-key.png

8.27 KB
Loading

docs/images/manage-nuget-keys.png

18 KB
Loading

0 commit comments

Comments
 (0)