开发者社区> 了哥-duff> 正文

通过OAuth方式与docker hub v2 API交互

简介: 介绍docker hub的 OAuth调用过程
+关注继续查看

缘由

Docker hub提供V2版本接口后,使用了新的认证授权方式,需要通过OAuth的认证授权方式来调用其API。本文主要是演示获取某个镜像的tag的列表过程,其它接口调用方式类似
本例子使用了httpie工具,如果在mac下可以用过brew方式安装

brew install httpie

交互过程

先直接调用需要的资源

这里以查询nginx的tag列表为例

http https://registry.hub.docker.com/v2/library/nginx/tags/list

这个时候,因为没有获取到授权,所以服务会返回需要授权的相关信息

HTTP/1.1 401 Unauthorized
Content-Length: 156
Content-Type: application/json; charset=utf-8
Date: Wed, 05 Sep 2018 03:05:35 GMT
Docker-Distribution-Api-Version: registry/2.0
Strict-Transport-Security: max-age=31536000
Www-Authenticate: Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository:library/nginx:pull"

{
    "errors": [
        {
            "code": "UNAUTHORIZED",
            "detail": [
                {
                    "Action": "pull",
                    "Class": "",
                    "Name": "library/nginx",
                    "Type": "repository"
                }
            ],
            "message": "authentication required"
        }
    ]
}

注意"Www-Authenticate"这个http头,这个是我们需要进行认证授权的信息

  • Bearer realm: 是进行授权服务器的地址
  • service: 是试用的服务信息
  • scope: 是授权的范围

有了这些对应的信息,我们就可以调用授权服务来进行授权了

使用用户名密码授权

http -a <用户名>:<密码> https://auth.docker.io/token  service==registry.docker.io scope==repository:library/nginx:pull

如果认证通过,则会返回对应的授权信息

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Sep 2018 03:08:20 GMT
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked

{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNSUlDK2pDQ0FwK2dBd0lCQWdJQkFEQUtCZ2dxaGtqT1BRUURBakJHTVVRd1FnWURWUVFERXpzeVYwNVpPbFZMUzFJNlJFMUVVanBTU1U5Rk9reEhOa0U2UTFWWVZEcE5SbFZNT2tZelNFV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VRBS0JnZ3Foa2pPUFFRREFnTkpBREJHQWlFQWdZTWF3Si9uMXM0dDlva0VhRjh2aGVkeURzbERObWNyTHNRNldmWTFmRTRDSVFEbzNWazJXcndiSjNmU1dwZEVjT3hNazZ1ZEFwK2c1Nkd6TjlRSGFNeVZ1QT09Il19.eyJhY2Nlc3MiOlt7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6ImxpYnJhcnkvbmdpbngiLCJhY3Rpb25zIjpbInB1bGwiXX1dLCJhdWQiOiJyZWdpc3RyeS5kb2NrZXIuaW8iLCJleHAiOjE1MzYxMTcyMDAsImlhdCI6MTUzNjExNjkwMCwiaXNzIjoiYXV0aC5kb2NrZXIuaW8iLCJqdGkiOiJiek81UDd4VWZPdG1raXFfcUtvZCIsIm5iZiI6MTUzNjExNjYwMCwic3ViIjoiZDk0MTY0MzgtNzRjMC0xMWU0LWJlYTQtMDI0MmFjMTEwMDFiIn0.TSVfcHfpAe-HuzmJ1V-AixLSotEdtQU_zYgXfkomWVbPz8wZx_DtTZRUmMaW7X0J37MpQbrABCeRD-ZlY7TCa7IliGXZISWgB7mn89mENHWnEB-1FyyUqH5XS4kTtG7XEY-bx3nlxQybtqrYFhroVUsxuXzsrTax0OmdZH07Gyi3K3Diszipu4QejSpdN-pVjvS3jUCFyI-dW3IALKEompe4zAuZ0Aux-yuEz4TxJDOGFVYry4F0OgNiFtlLGsO6vPbFloMRPaU6e3YCTgVkRjQbugOjamsB_0URcwJpuZO4qDisV2_faCY72TG_P240mv0Ui4ywvHMcn5YWVIAABQ"
}

这里access_token就是用来访问资源的授权token。授权的token的类型是Bearer
备注:docker hub不太遵守OAuth2的标准,所以这里返回值,也和OAuth不太相同

通过授权key再度访问资源

http https://registry.hub.docker.com/v2/library/nginx/tags/list 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNSUlDK2pDQ0FwK2dBd0lCQWdJQkFEQUtCZ2dxaGtqT1BRUURBakJHTV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ZSRTFFVWpwU1NVOUZPa3hITmtFNlExVllWRHBOUmxWTU9rWXpTRVU2TlZBeVZUcExTak5HT2tOQk5sazZTa2xFVVRBS0JnZ3Foa2pPUFFRREFnTkpBREJHQWlFQWdZTWF3Si9uMXM0dDlva0VhRjh2aGVkeURzbERObWNyTHNRNldmWTFmRTRDSVFEbzNWazJXcndiSjNmU1dwZEVjT3hNazZ1ZEFwK2c1Nkd6TjlRSGFNeVZ1QT09Il19.eyJhY2Nlc3MiOlt7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6ImxpYnJhcnkvbmdpbngiLCJhY3Rpb25zIjpbInB1bGwiXX1dLCJhdWQiOiJyZWdpc3RyeS5kb2NrZXIuaW8iLCJleHAiOjE1MzYxMTcyMDAsImlhdCI6MTUzNjExNjkwMCwiaXNzIjoiYXV0aC5kb2NrZXIuaW8iLCJqdGkiOiJiek81UDd4VWZPdG1raXFfcUtvZCIsIm5iZiI6MTUzNjExNjYwMCwic3ViIjoiZDk0MTY0MzgtNzRjMC0xMWU0LWJlYTQtMDI0MmFjMTEwMDFiIn0.TSVfcHfpAe-HuzmJ1V-AixLSotEdtQU_zYgXfkomWVbPz8wZx_DtTZRUmMaW7X0J37MpQbrABCeRD-ZlY7TCa7IliGXZISWgB7mn89mENHWnEB-1FyyUqH5XS4kTtG7XEY-bx3nlxQybtqrYFhroVUsxuXzsrTax0OmdZH07Gyi3K3Diszipu4QejSpdN-pVjvS3jUCFyI-dW3IALKEompe4zAuZ0Aux-yuEz4TxJDOGFVYry4F0OgNiFtlLGsO6vPbFloMRPaU6e3YCTgVkRjQbugOjamsB_0URcwJpuZO4qDisV2_faCY72TG_P240mv0Ui4ywvHMcn5YWVIAABQ'

这样就可以获得对应的资源信息了

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Wed, 05 Sep 2018 03:09:26 GMT
Docker-Distribution-Api-Version: registry/2.0
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked

{
    "name": "library/nginx",
    "tags": [
        "1-alpine-perl",
        "1-alpine",
        "1-perl",
        "1.10-alpine",
        "1.10.0-alpine",
        "1.10.0",
        "1.10.1-alpine",
        "1.10.1",
        "1.10.2-alpine",
        "1.10.2",
        "1.10.3-alpine",
        "1.10.3",
        "1.10",
        "1.11-alpine",
        "1.11.0-alpine",
        "1.11.0",
        "1.11.1-alpine",
        "1.11.1",
        "1.11.10-alpine",
        "1.11.10",
        "1.11.12-alpine",
        "1.11.12",
        "1.11.13-alpine",
        "1.11.13",
        "1.11.3-alpine",
        "1.11.3",
        "1.11.4-alpine",
        "1.11.4",
        "1.11.5-alpine",
        "1.11.5",
        "1.11.6-alpine",
        "1.11.6",
        "1.11.7-alpine",
        "1.11.7",
        "1.11.8-alpine",
        "1.11.8",
        "1.11.9-alpine",
        "1.11.9",
        "1.11",
        "1.12-alpine-perl",
        "1.12-alpine",
        "1.12-perl",
        "1.12.0-alpine-perl",
        "1.12.0-alpine",
        "1.12.0-perl",
        "1.12.0",
        "1.12.1-alpine-perl",
        "1.12.1-alpine",
        "1.12.1-perl",
        "1.12.1",
        "1.12.2-alpine-perl",
        "1.12.2-alpine",
        "1.12.2-perl",
        "1.12.2",
        "1.12",
        "1.13-alpine-perl",
        "1.13-alpine",
        "1.13-perl",
        "1.13.0-alpine-perl",
        "1.13.0-alpine",
        "1.13.0-perl",
        "1.13.0",
        "1.13.1-alpine-perl",
        "1.13.1-alpine",
        "1.13.1-perl",
        "1.13.1",
        "1.13.10-alpine-perl",
        "1.13.10-alpine",
        "1.13.10-perl",
        "1.13.10",
        "1.13.11-alpine-perl",
        "1.13.11-alpine",
        "1.13.11-perl",
        "1.13.11",
        "1.13.12-alpine-perl",
        "1.13.12-alpine",
        "1.13.12-perl",
        "1.13.12",
        "1.13.2-alpine-perl",
        "1.13.2-alpine",
        "1.13.2-perl",
        "1.13.2",
        "1.13.3-alpine-perl",
        "1.13.3-alpine",
        "1.13.3-perl",
        "1.13.3",
        "1.13.5-alpine-perl",
        "1.13.5-alpine",
        "1.13.5-perl",
        "1.13.5",
        "1.13.6-alpine-perl",
        "1.13.6-alpine",
        "1.13.6-perl",
        "1.13.6",
        "1.13.7-alpine-perl",
        "1.13.7-alpine",
        "1.13.7-perl",
        "1.13.7",
        "1.13.8-alpine-perl",
        "1.13.8-alpine",
        "1.13.8-perl",
        "1.13.8",
        "1.13.9-alpine-perl",
        "1.13.9-alpine",
        "1.13.9-perl",
        "1.13.9",
        "1.13",
        "1.14-alpine-perl",
        "1.14-alpine",
        "1.14-perl",
        "1.14.0-alpine-perl",
        "1.14.0-alpine",
        "1.14.0-perl",
        "1.14.0",
        "1.14",
        "1.15-alpine-perl",
        "1.15-alpine",
        "1.15-perl",
        "1.15.0-alpine-perl",
        "1.15.0-alpine",
        "1.15.0-perl",
        "1.15.0",
        "1.15.1-alpine-perl",
        "1.15.1-alpine",
        "1.15.1-perl",
        "1.15.1",
        "1.15.2-alpine-perl",
        "1.15.2-alpine",
        "1.15.2-perl",
        "1.15.2",
        "1.15.3-alpine-perl",
        "1.15.3-alpine",
        "1.15.3-perl",
        "1.15.3",
        "1.15",
        "1.7.1",
        "1.7.10",
        "1.7.11",
        "1.7.12",
        "1.7.5",
        "1.7.6",
        "1.7.7",
        "1.7.8",
        "1.7.9",
        "1.7",
        "1.8-alpine",
        "1.8.1-alpine",
        "1.8.1",
        "1.8",
        "1.9-alpine",
        "1.9.0",
        "1.9.1",
        "1.9.10",
        "1.9.11",
        "1.9.12",
        "1.9.14-alpine",
        "1.9.14",
        "1.9.15-alpine",
        "1.9.15",
        "1.9.2",
        "1.9.3",
        "1.9.4",
        "1.9.5",
        "1.9.6",
        "1.9.7",
        "1.9.8",
        "1.9.9",
        "1.9",
        "1",
        "alpine-perl",
        "alpine",
        "latest",
        "mainline-alpine-perl",
        "mainline-alpine",
        "mainline-perl",
        "mainline",
        "perl",
        "stable-alpine-perl",
        "stable-alpine",
        "stable-perl",
        "stable"
    ]
}

访问阿里云镜像信息

使用相同的方式可以调用阿里云的镜像服务相关API

参考

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
如何设置阿里云服务器安全组?阿里云安全组规则详细解说
阿里云安全组设置详细图文教程(收藏起来) 阿里云服务器安全组设置规则分享,阿里云服务器安全组如何放行端口设置教程。阿里云会要求客户设置安全组,如果不设置,阿里云会指定默认的安全组。那么,这个安全组是什么呢?顾名思义,就是为了服务器安全设置的。安全组其实就是一个虚拟的防火墙,可以让用户从端口、IP的维度来筛选对应服务器的访问者,从而形成一个云上的安全域。
19808 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
29158 0
阿里云服务器安全组设置内网互通的方法
虽然0.0.0.0/0使用非常方便,但是发现很多同学使用它来做内网互通,这是有安全风险的,实例有可能会在经典网络被内网IP访问到。下面介绍一下四种安全的内网互联设置方法。 购买前请先:领取阿里云幸运券,有很多优惠,可到下文中领取。
22538 0
阿里云服务器ECS登录用户名是什么?系统不同默认账号也不同
阿里云服务器Windows系统默认用户名administrator,Linux镜像服务器用户名root
16449 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
20698 0
腾讯云服务器 设置ngxin + fastdfs +tomcat 开机自启动
在tomcat中新建一个可以启动的 .sh 脚本文件 /usr/local/tomcat7/bin/ export JAVA_HOME=/usr/local/java/jdk7 export PATH=$JAVA_HOME/bin/:$PATH export CLASSPATH=.
14900 0
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
23580 0
+关注
了哥-duff
游走于产品与架构间,关注容器、Kubernetes,微服务,ServiceMesh
18
文章
0
问答
来源圈子
更多
容器服务 Kubernetes 版(简称 ACK)提供高性能可伸缩的容器应用管理能力,支持企业级 Kubernetes 容器化应用的全生命周期管理。容器服务 Kubernetes 版简化集群的搭建和扩容等工作,整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳的 Kubernetes 容器化应用运行环境。
+ 订阅
相关文档: 容器镜像服务 ACR 容器服务 ACK 服务网格 ASM
文章排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载