Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/jfrog/documentation into fr…
Browse files Browse the repository at this point in the history
…ogbot-project-unique-identifier-update
  • Loading branch information
eranturgeman committed Mar 4, 2024
2 parents 62ca9e7 + 578d70d commit 1a520bc
Show file tree
Hide file tree
Showing 15 changed files with 3,125 additions and 3,119 deletions.
14 changes: 13 additions & 1 deletion jfrog-applications/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@
* [Setting up a CI Pipeline](jfrog-cli/get-started/configurations/setting-up-a-ci-pipeline.md)
* [Proxy Support](jfrog-cli/get-started/configurations/proxy-support.md)
* [CLI for JFrog Artifactory](jfrog-cli/cli-for-jfrog-artifactory/README.md)
* [Environment Variables](jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md)
* [Authentication](jfrog-cli/cli-for-jfrog-artifactory/authentication.md)
* [Verifying Artifactory's Accessibility](jfrog-cli/cli-for-jfrog-artifactory/verifying-artifactory-accessibility.md)
* [Generic Files](jfrog-cli/cli-for-jfrog-artifactory/generic-files.md)
* [Using File Specs](jfrog-cli/cli-for-jfrog-artifactory/using-file-specs.md)
* [Using Placeholders](jfrog-cli/cli-for-jfrog-artifactory/using-placeholders.md)
* [Build Integration](jfrog-cli/cli-for-jfrog-artifactory/build-integration.md)
* [Package Managers Integration](jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration.md)
* [Storing Symlinks in Artifactory](jfrog-cli/cli-for-jfrog-artifactory/storing-symlinks.md)
* [cUrl Integration](jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md)
* [Managing Configuration Entities](jfrog-cli/cli-for-jfrog-artifactory/managing-configuration-entities.md)
* [Release Lifecycle Management](jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md)
* [Transferring Files Between Artifactory Servers](jfrog-cli/cli-for-jfrog-artifactory/transferring-files-between-artifactory-servers.md)
* [Cleaning Up Unreferenced Files from a Git LFS Repository](jfrog-cli/cli-for-jfrog-artifactory/git-lfs.md)
* [CLI for JFrog Security](jfrog-cli/cli-for-jfrog-security/README.md)
* [Authentication](jfrog-cli/cli-for-jfrog-security/authentication.md)
* [Scan your Source Code](jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md)
Expand All @@ -23,7 +36,6 @@
* [CLI for JFrog Curation](jfrog-cli/cli-for-jfrog-curation.md)
* [CLI for JFrog Distribution](jfrog-cli/cli-for-jfrog-distribution.md)
* [CLI for JFrog Pipelines](jfrog-cli/cli-for-jfrog-pipelines.md)
* [CLI for JFrog Release Lifecycle Management](jfrog-cli/cli-for-jfrog-release-lifecycle-management.md)
* [CLI for JFrog Cloud Transfer](jfrog-cli/cli-for-jfrog-cloud-transfer.md)
* [JFrog CLI Plugins](jfrog-cli/cli-plugins/README.md)
* [JFrog CLI Plugins Developer Guide](jfrog-cli/cli-plugins/developer-guide.md)
Expand Down
3,111 changes: 10 additions & 3,101 deletions jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Authentication
## Overview
When used with Artifactory, JFrog CLI offers several means of authentication: JFrog CLI does not support accessing Artifactory without authentication.

## Authenticating with Username and Password / API Key

To authenticate yourself using your JFrog login credentials, either configure your credentials once using the **jf c add** command or provide the following option to each command.

| Command option | Description |
| -------------- | --------------------------------------------------------------------- |
| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory |
| --user | JFrog username |
| --password | JFrog password or API key |

For enhanced security, when JFrog CLI is configured to use a username and password / API key, it automatically generates an access token to authenticate with Artifactory. The generated access token is valid for one hour only. JFrog CLI automatically refreshed the token before it expires. The **jfrog c add** command allows disabling this functionality. This feature is currently not supported by commands which use external tools or package managers or work with JFrog Distribution.

## Authenticating with an Access Token

To authenticate yourself using an Artifactory Access Token, either configure your Access Token once using the **jf c add** command or provide the following option to each command.

| Command option | Description |
| -------------- | --------------------------------------------------------------------- |
| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory |
| --access-token | JFrog access token |

## Authenticating with RSA Keys

***

**Note**

> Currently, authentication with RSA keys is not supported when working with external package managers and build tools (Maven, Gradle, Npm, Docker, Go and NuGet) or with the cUrl integration.
***

From version 4.4, Artifactory supports SSH authentication using RSA public and private keys. To authenticate yourself to Artifactory using RSA keys, execute the following instructions:

* Enable SSH authentication as described in [Configuring SSH](https://jfrog.com/help/r/jfrog-platform-administration-Documentation/Managing-Ssh-Keys).
* Configure your Artifactory URL to have the following format: `ssh://[host]:[port]` There are two ways to do this:

* For each command, use the `--url` command option.
* Specify the Artifactory URL in the correct format using the **jfrog c add** command.

***

**Warning**\
\
**Don't include your Artifactory context URL**

> Make sure that the \[host] component of the URL only includes the hostname or the IP, but not your Artifactory context URL.
***
* Configure the path to your SSH key file. There are two ways to do this:
* For each command, use the `--ssh-key-path` command option.
* Specify the path using the **jfrog c add** command.

## Authenticating using Client Certificates (mTLS)

From Artifactory release 7.38.4, you can authenticate users using a client certificate ([mTLS](https://en.wikipedia.org/wiki/Mutual\_authentication#mTLS)). To do so will require a reverse proxy and some setup on the front reverse proxy (Nginx). Read about how to set this up [here](https://jfrog.com/help/r/jfrog-artifactory-documentation/Http-Settings).

To authenticate with the proxy using a client certificate, either configure your certificate once using the **jf c add** command or use the --`client-cert-path` and`--client-cert-ket-path` command options with each command.

***

**Note**

> Authentication using client certificates (mTLS) is not supported by commands which integrate with package managers.
***

Not Using a Public CA (Certificate Authority)?

This section is relevant for you if you're not using a public CA (Certificate Authority) to issue the SSL certificate used to connect to your Artifactory domain. You may not be using a public CA either because you're using self-signed certificates or you're running your own PKI services in-house (often by using a Microsoft CA).

In this case, you'll need to make those certificates available for JFrog CLI, by placing them inside the **security/certs** directory, which is under JFrog CLI's home directory. By default, the home directory is **\~/.jfrog**, but it can be also set using the **JFROG\_CLI\_HOME\_DIR** environment variable.

**Note**

1. The supported certificate format is PEM.
2. Some commands support the **--insecure-tls** option, which skips the TLS certificates verification.
3. Before version 1.37.0, JFrog CLI expected the certificates to be located directly under the **security** directory. JFrog CLI will automatically move the certificates to the new directory when installing version 1.37.0 or above. Downgrading back to an older version requires replacing the configuration directory manually. You'll find a backup if the old configuration under **.jfrog/backup**
Loading

0 comments on commit 1a520bc

Please sign in to comment.