ソースを参照

Merge pull request #846 from smallstep/herman/scep-url-config

Add configuration for custom path segment on SCEP provisioners
Herman Slatman 4 年 前
親
コミット
7a13661e4c
2 ファイル変更、3 行追加、0 行削除
  1. 1 0
      CHANGELOG.md
  2. 2 0
      scep/api/api.go

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 ## [Unreleased - 0.18.3] - DATE
 ### Added
 ### Changed
+- Made SCEP CA URL paths dynamic
 ### Deprecated
 ### Removed
 ### Fixed

+ 2 - 0
scep/api/api.go

@@ -66,7 +66,9 @@ func New(scepAuth scep.Interface) api.RouterHandler {
 // Route traffic and implement the Router interface.
 func (h *Handler) Route(r api.Router) {
 	getLink := h.Auth.GetLinkExplicit
+	r.MethodFunc(http.MethodGet, getLink("{provisionerName}/*", false, nil), h.lookupProvisioner(h.Get))
 	r.MethodFunc(http.MethodGet, getLink("{provisionerName}", false, nil), h.lookupProvisioner(h.Get))
+	r.MethodFunc(http.MethodPost, getLink("{provisionerName}/*", false, nil), h.lookupProvisioner(h.Post))
 	r.MethodFunc(http.MethodPost, getLink("{provisionerName}", false, nil), h.lookupProvisioner(h.Post))
 }