Просмотр исходного кода

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

Add configuration for custom path segment on SCEP provisioners
Herman Slatman 4 лет назад
Родитель
Сommit
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))
 }