{"action":"created","comment":{"url":"https://api.github.com/repos/smallstep/certificates/pulls/comments/295947203","pull_request_review_id":252416313,"id":295947203,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5NTk0NzIwMw==","diff_hunk":"@@ -100,13 +106,47 @@ func (ca *CA) Init(config *authority.Config) (*CA, error) {\n \tmux := chi.NewRouter()\n \thandler := http.Handler(mux)\n \n-\t// Add api endpoints in / and /1.0\n+\t// Add regular CA api endpoints in / and /1.0\n \trouterHandler := api.New(auth)\n \trouterHandler.Route(mux)\n+\tmux.Route(\"/\", func(r chi.Router) {\n+\t\trouterHandler.Route(r)\n+\t})\n \tmux.Route(\"/1.0\", func(r chi.Router) {\n \t\trouterHandler.Route(r)\n \t})\n \n+\tif config.ACME != nil {\n+\t\t//Add ACME api endpoints in /acme and /1.0/acme\n+\t\tdns := config.DNSNames[0]\n+\t\tu, err := url.Parse(\"https://\" + config.Address)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tport := u.Port()\n+\t\tif port != \"\" && port != \"443\" {\n+\t\t\tdns = fmt.Sprintf(\"%s:%s\", dns, port)\n+\t\t}\n+\t\tprefix := config.ACME.Prefix\n+\t\tacmeAuth := acme.NewAuthority(auth.GetDatabase().(nosql.DB), dns, prefix, auth)\n+\t\tacmeRouterHandler := acmeAPI.New(acmeAuth)\n+\t\tmux.Route(\"/\"+prefix, func(r chi.Router) {\n+\t\t\tacmeRouterHandler.Route(r)\n+\t\t})\n+\t\tmux.Route(\"/1.0/\"+prefix, func(r chi.Router) {\n+\t\t\tacmeRouterHandler.Route(r)\n+\t\t})\n+\t}","path":"ca/ca.go","position":77,"original_position":77,"commit_id":"b4f7a8563f51127476597824b5ddee0e6c9e419a","original_commit_id":"b4f7a8563f51127476597824b5ddee0e6c9e419a","user":{"login":"maraino","id":416157,"node_id":"MDQ6VXNlcjQxNjE1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/416157?v=4","gravatar_id":"","url":"https://api.github.com/users/maraino","html_url":"https://github.com/maraino","followers_url":"https://api.github.com/users/maraino/followers","following_url":"https://api.github.com/users/maraino/following{/other_user}","gists_url":"https://api.github.com/users/maraino/gists{/gist_id}","starred_url":"https://api.github.com/users/maraino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraino/subscriptions","organizations_url":"https://api.github.com/users/maraino/orgs","repos_url":"https://api.github.com/users/maraino/repos","events_url":"https://api.github.com/users/maraino/events{/privacy}","received_events_url":"https://api.github.com/users/maraino/received_events","type":"User","site_admin":false},"body":"This block will change to support different acme provisioners.","created_at":"2019-06-20T18:48:27Z","updated_at":"2019-06-20T18:52:07Z","html_url":"https://github.com/smallstep/certificates/pull/76#discussion_r295947203","pull_request_url":"https://api.github.com/repos/smallstep/certificates/pulls/76","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/comments/295947203"},"html":{"href":"https://github.com/smallstep/certificates/pull/76#discussion_r295947203"},"pull_request":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/smallstep/certificates/pulls/76","id":284785994,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg0Nzg1OTk0","html_url":"https://github.com/smallstep/certificates/pull/76","diff_url":"https://github.com/smallstep/certificates/pull/76.diff","patch_url":"https://github.com/smallstep/certificates/pull/76.patch","issue_url":"https://api.github.com/repos/smallstep/certificates/issues/76","number":76,"state":"open","locked":false,"title":"Acme Support","user":{"login":"dopey","id":1820847,"node_id":"MDQ6VXNlcjE4MjA4NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1820847?v=4","gravatar_id":"","url":"https://api.github.com/users/dopey","html_url":"https://github.com/dopey","followers_url":"https://api.github.com/users/dopey/followers","following_url":"https://api.github.com/users/dopey/following{/other_user}","gists_url":"https://api.github.com/users/dopey/gists{/gist_id}","starred_url":"https://api.github.com/users/dopey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dopey/subscriptions","organizations_url":"https://api.github.com/users/dopey/orgs","repos_url":"https://api.github.com/users/dopey/repos","events_url":"https://api.github.com/users/dopey/events{/privacy}","received_events_url":"https://api.github.com/users/dopey/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-06-04T01:43:42Z","updated_at":"2019-06-20T18:52:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50353dabee91b9b95c3cd89f1adb5b9e1aebd93f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/smallstep/certificates/pulls/76/commits","review_comments_url":"https://api.github.com/repos/smallstep/certificates/pulls/76/comments","review_comment_url":"https://api.github.com/repos/smallstep/certificates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smallstep/certificates/issues/76/comments","statuses_url":"https://api.github.com/repos/smallstep/certificates/statuses/b4f7a8563f51127476597824b5ddee0e6c9e419a","head":{"label":"smallstep:acme","ref":"acme","sha":"b4f7a8563f51127476597824b5ddee0e6c9e419a","user":{"login":"smallstep","id":23183426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgzNDI2","avatar_url":"https://avatars3.githubusercontent.com/u/23183426?v=4","gravatar_id":"","url":"https://api.github.com/users/smallstep","html_url":"https://github.com/smallstep","followers_url":"https://api.github.com/users/smallstep/followers","following_url":"https://api.github.com/users/smallstep/following{/other_user}","gists_url":"https://api.github.com/users/smallstep/gists{/gist_id}","starred_url":"https://api.github.com/users/smallstep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallstep/subscriptions","organizations_url":"https://api.github.com/users/smallstep/orgs","repos_url":"https://api.github.com/users/smallstep/repos","events_url":"https://api.github.com/users/smallstep/events{/privacy}","received_events_url":"https://api.github.com/users/smallstep/received_events","type":"Organization","site_admin":false},"repo":{"id":155658556,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU2NTg1NTY=","name":"certificates","full_name":"smallstep/certificates","private":false,"owner":{"login":"smallstep","id":23183426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgzNDI2","avatar_url":"https://avatars3.githubusercontent.com/u/23183426?v=4","gravatar_id":"","url":"https://api.github.com/users/smallstep","html_url":"https://github.com/smallstep","followers_url":"https://api.github.com/users/smallstep/followers","following_url":"https://api.github.com/users/smallstep/following{/other_user}","gists_url":"https://api.github.com/users/smallstep/gists{/gist_id}","starred_url":"https://api.github.com/users/smallstep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallstep/subscriptions","organizations_url":"https://api.github.com/users/smallstep/orgs","repos_url":"https://api.github.com/users/smallstep/repos","events_url":"https://api.github.com/users/smallstep/events{/privacy}","received_events_url":"https://api.github.com/users/smallstep/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smallstep/certificates","description":"🛡️ An online certificate authority and related tools for secure automated certificate management, so you can use TLS everywhere.","fork":false,"url":"https://api.github.com/repos/smallstep/certificates","forks_url":"https://api.github.com/repos/smallstep/certificates/forks","keys_url":"https://api.github.com/repos/smallstep/certificates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smallstep/certificates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smallstep/certificates/teams","hooks_url":"https://api.github.com/repos/smallstep/certificates/hooks","issue_events_url":"https://api.github.com/repos/smallstep/certificates/issues/events{/number}","events_url":"https://api.github.com/repos/smallstep/certificates/events","assignees_url":"https://api.github.com/repos/smallstep/certificates/assignees{/user}","branches_url":"https://api.github.com/repos/smallstep/certificates/branches{/branch}","tags_url":"https://api.github.com/repos/smallstep/certificates/tags","blobs_url":"https://api.github.com/repos/smallstep/certificates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smallstep/certificates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smallstep/certificates/git/refs{/sha}","trees_url":"https://api.github.com/repos/smallstep/certificates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smallstep/certificates/statuses/{sha}","languages_url":"https://api.github.com/repos/smallstep/certificates/languages","stargazers_url":"https://api.github.com/repos/smallstep/certificates/stargazers","contributors_url":"https://api.github.com/repos/smallstep/certificates/contributors","subscribers_url":"https://api.github.com/repos/smallstep/certificates/subscribers","subscription_url":"https://api.github.com/repos/smallstep/certificates/subscription","commits_url":"https://api.github.com/repos/smallstep/certificates/commits{/sha}","git_commits_url":"https://api.github.com/repos/smallstep/certificates/git/commits{/sha}","comments_url":"https://api.github.com/repos/smallstep/certificates/comments{/number}","issue_comment_url":"https://api.github.com/repos/smallstep/certificates/issues/comments{/number}","contents_url":"https://api.github.com/repos/smallstep/certificates/contents/{+path}","compare_url":"https://api.github.com/repos/smallstep/certificates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smallstep/certificates/merges","archive_url":"https://api.github.com/repos/smallstep/certificates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smallstep/certificates/downloads","issues_url":"https://api.github.com/repos/smallstep/certificates/issues{/number}","pulls_url":"https://api.github.com/repos/smallstep/certificates/pulls{/number}","milestones_url":"https://api.github.com/repos/smallstep/certificates/milestones{/number}","notifications_url":"https://api.github.com/repos/smallstep/certificates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smallstep/certificates/labels{/name}","releases_url":"https://api.github.com/repos/smallstep/certificates/releases{/id}","deployments_url":"https://api.github.com/repos/smallstep/certificates/deployments","created_at":"2018-11-01T03:44:28Z","updated_at":"2019-06-19T11:00:34Z","pushed_at":"2019-06-20T16:27:53Z","git_url":"git://github.com/smallstep/certificates.git","ssh_url":"git@github.com:smallstep/certificates.git","clone_url":"https://github.com/smallstep/certificates.git","svn_url":"https://github.com/smallstep/certificates","homepage":"https://smallstep.com","size":34203,"stargazers_count":577,"watchers_count":577,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":8,"watchers":577,"default_branch":"master"}},"base":{"label":"smallstep:master","ref":"master","sha":"fb4d114a82ad82f4c831f0a4018b6044951a45c1","user":{"login":"smallstep","id":23183426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgzNDI2","avatar_url":"https://avatars3.githubusercontent.com/u/23183426?v=4","gravatar_id":"","url":"https://api.github.com/users/smallstep","html_url":"https://github.com/smallstep","followers_url":"https://api.github.com/users/smallstep/followers","following_url":"https://api.github.com/users/smallstep/following{/other_user}","gists_url":"https://api.github.com/users/smallstep/gists{/gist_id}","starred_url":"https://api.github.com/users/smallstep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallstep/subscriptions","organizations_url":"https://api.github.com/users/smallstep/orgs","repos_url":"https://api.github.com/users/smallstep/repos","events_url":"https://api.github.com/users/smallstep/events{/privacy}","received_events_url":"https://api.github.com/users/smallstep/received_events","type":"Organization","site_admin":false},"repo":{"id":155658556,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU2NTg1NTY=","name":"certificates","full_name":"smallstep/certificates","private":false,"owner":{"login":"smallstep","id":23183426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgzNDI2","avatar_url":"https://avatars3.githubusercontent.com/u/23183426?v=4","gravatar_id":"","url":"https://api.github.com/users/smallstep","html_url":"https://github.com/smallstep","followers_url":"https://api.github.com/users/smallstep/followers","following_url":"https://api.github.com/users/smallstep/following{/other_user}","gists_url":"https://api.github.com/users/smallstep/gists{/gist_id}","starred_url":"https://api.github.com/users/smallstep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallstep/subscriptions","organizations_url":"https://api.github.com/users/smallstep/orgs","repos_url":"https://api.github.com/users/smallstep/repos","events_url":"https://api.github.com/users/smallstep/events{/privacy}","received_events_url":"https://api.github.com/users/smallstep/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smallstep/certificates","description":"🛡️ An online certificate authority and related tools for secure automated certificate management, so you can use TLS everywhere.","fork":false,"url":"https://api.github.com/repos/smallstep/certificates","forks_url":"https://api.github.com/repos/smallstep/certificates/forks","keys_url":"https://api.github.com/repos/smallstep/certificates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smallstep/certificates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smallstep/certificates/teams","hooks_url":"https://api.github.com/repos/smallstep/certificates/hooks","issue_events_url":"https://api.github.com/repos/smallstep/certificates/issues/events{/number}","events_url":"https://api.github.com/repos/smallstep/certificates/events","assignees_url":"https://api.github.com/repos/smallstep/certificates/assignees{/user}","branches_url":"https://api.github.com/repos/smallstep/certificates/branches{/branch}","tags_url":"https://api.github.com/repos/smallstep/certificates/tags","blobs_url":"https://api.github.com/repos/smallstep/certificates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smallstep/certificates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smallstep/certificates/git/refs{/sha}","trees_url":"https://api.github.com/repos/smallstep/certificates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smallstep/certificates/statuses/{sha}","languages_url":"https://api.github.com/repos/smallstep/certificates/languages","stargazers_url":"https://api.github.com/repos/smallstep/certificates/stargazers","contributors_url":"https://api.github.com/repos/smallstep/certificates/contributors","subscribers_url":"https://api.github.com/repos/smallstep/certificates/subscribers","subscription_url":"https://api.github.com/repos/smallstep/certificates/subscription","commits_url":"https://api.github.com/repos/smallstep/certificates/commits{/sha}","git_commits_url":"https://api.github.com/repos/smallstep/certificates/git/commits{/sha}","comments_url":"https://api.github.com/repos/smallstep/certificates/comments{/number}","issue_comment_url":"https://api.github.com/repos/smallstep/certificates/issues/comments{/number}","contents_url":"https://api.github.com/repos/smallstep/certificates/contents/{+path}","compare_url":"https://api.github.com/repos/smallstep/certificates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smallstep/certificates/merges","archive_url":"https://api.github.com/repos/smallstep/certificates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smallstep/certificates/downloads","issues_url":"https://api.github.com/repos/smallstep/certificates/issues{/number}","pulls_url":"https://api.github.com/repos/smallstep/certificates/pulls{/number}","milestones_url":"https://api.github.com/repos/smallstep/certificates/milestones{/number}","notifications_url":"https://api.github.com/repos/smallstep/certificates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smallstep/certificates/labels{/name}","releases_url":"https://api.github.com/repos/smallstep/certificates/releases{/id}","deployments_url":"https://api.github.com/repos/smallstep/certificates/deployments","created_at":"2018-11-01T03:44:28Z","updated_at":"2019-06-19T11:00:34Z","pushed_at":"2019-06-20T16:27:53Z","git_url":"git://github.com/smallstep/certificates.git","ssh_url":"git@github.com:smallstep/certificates.git","clone_url":"https://github.com/smallstep/certificates.git","svn_url":"https://github.com/smallstep/certificates","homepage":"https://smallstep.com","size":34203,"stargazers_count":577,"watchers_count":577,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":8,"watchers":577,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/76"},"html":{"href":"https://github.com/smallstep/certificates/pull/76"},"issue":{"href":"https://api.github.com/repos/smallstep/certificates/issues/76"},"comments":{"href":"https://api.github.com/repos/smallstep/certificates/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smallstep/certificates/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/smallstep/certificates/statuses/b4f7a8563f51127476597824b5ddee0e6c9e419a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"maraino"}}