【问题标题】:Running access for ArtifactoryArtifactory 的运行访问权限
【发布时间】:2017-09-12 03:16:20
【问题描述】:

Artifactory 新手,请多多包涵。

尝试(但失败)创建新的访问令牌。
Artifactory 中的 GUI 对此一无所知,但指向用户指南 (https://www.jfrog.com/confluence/display/RTF/Access+Tokens),其中讨论了通过 WAR 文件管理访问令牌。
这是简介:

Access Service

From Artifactory version 5.4, access tokens are managed under a new service 
called Access which is implemented in a separate WAR file, access.war. This 
change has no impact on how access tokens are used, however, the Artifactory 
installation file structure now also includes the added WAR file under the 
$ARTIFACTORY_HOME/webapps folder. Artifactory communicates with the Access 
service over HTTP and assumes it is running in the same Tomcat using the 
context path of "access".  

好的,太好了。那么如何访问这个东西呢?
我对网络应用程序/服务器也不太了解。在今天之前,我认为战争是国家之间的战斗:-)

我的 Artifactory 服务器 proc 正在运行,我可以确认访问 war 文件(显然是某种 jar 文件)在 webapps 目录中。
我可以通过“http://myserver:8081/artifactory/webapp/#/home”获得神器。

【问题讨论】:

    标签: war artifactory


    【解决方案1】:

    事实证明,我相信管理访问令牌的界面不是通过 gui 提供的。相反,您必须使用 REST 和 curl 命令。

    【讨论】:

      【解决方案2】:

      文档提到:

      Artifactory 管理员负责确保所有参与的实例都配备相同的密钥对。

      这意味着您需要有权访问服务器(安装了 Artifactory)。
      在该服务器上,安装 Artifactory 的文件夹是引用 ARTIFACTORY_HOME。
      这就是下一个文档摘录中使用的内容:

      1. 启动您信任圈中的第一个 Artifactory 实例(或用于 HA 安装的集群节点)。生成私钥和根证书并存储在 $ARTIFACTORY_HOME/access/etc/keys 下。
      2. 将私钥和根证书文件复制到文件系统上的某个位置,该位置可供您信任圈内的所有其他实例/节点访问。
      3. 在引导之前,为每个其他实例/节点创建 $ARTIFACTORY_HOME/access/etc 文件夹并在其中创建一个名为 access.bootstrap.config 的属性文件,其中包含以下内容:
          key=/path/to/private.key
          crt=/path/to/root.crt
      
      1. 每个实例/节点启动时,如果$ARTIFACTORY_HOME/access/etc/access.bootstrap.config文件存在,则将私钥和根证书从指定位置复制到服务器主目录$ARTIFACTORY_HOME/access/etc/keys下。

      【讨论】:

      • 感谢 VonC 的帮助。
      • 感谢 VonC 的帮助。但我遇到的问题是让 Access 在 Artifactory 正在运行的同一台主机上本地运行。我以为它只是管理菜单下的东西。相反,它谈到了使用访问 WAR。不知道该怎么做。我觉得我在这里在概念上遗漏了一些东西。再次感谢您的回复。
      • “我要做的是让 Access 在本地运行,在 Artifactory 运行的同一台主机上。”:您无需做任何事情:Artifactory 将在需要时使用 access.war。我确实看到部署在我的 Tomcat Artifactory 实例中的 webapp 访问(来自D:\artifactory\pro\artifactory-pro-5.4.6\webapps\access.war):D:\artifactory\pro\artifactory-pro-5.4.6\tomcat\webapps。我不必为此做任何事情。
      • 我创建了令牌(例如 curl uadmin:adminpw -XPOST "myserver:8081/artifactory/api/security/token" -d "username=myyuname")。 Msg 包含一个“访问令牌”,它是一个很长的字符串,但在 gui 中,创建的“令牌 id”类似于 xxxxx500-xxxx-xxxx-xxxx-xxxxxxxxxxxx。我尝试使用... curl -umyuname:xxxxx500-xxxx-xxxx-xxxx-xxxxxxxxxxxx myserver:8081/artifactory/api/system/ping ping 失败,出现 401(错误凭据)。我用很长的版本替换了令牌,我再次用硬编码的 pw 替换了相同的结果,并且有效。如何让 Token 工作?
      • @daveg 尝试使用令牌作为用户名,密码为空:curl -uxxxx500-... myserver...
      猜你喜欢
      • 2016-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多