KartikMistry has uploaded a new change for review.
https://gerrit.wikimedia.org/r/247819
Change subject: cxserver: Add JWT token support
......................................................................
cxserver: Add JWT token support
Bug: T116134
Change-Id: I338070364e5b723274c9627bfae42a1975011a9a
---
M modules/cxserver/manifests/init.pp
M modules/cxserver/templates/config.erb
2 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/19/247819/1
diff --git a/modules/cxserver/manifests/init.pp
b/modules/cxserver/manifests/init.pp
index 4d5584f..8b2dc2d 100644
--- a/modules/cxserver/manifests/init.pp
+++ b/modules/cxserver/manifests/init.pp
@@ -36,6 +36,8 @@
# Port where to run the cxserver service. Defaults to 8080.
# [*registry*]
# Registry to use for language pairs for Content Translation.
+# [*jwt_secret*]
+# JWT secret token
class cxserver(
$base_path = '/srv/deployment/cxserver/deploy',
$node_path = '/srv/deployment/cxserver/deploy/node_modules',
@@ -51,6 +53,7 @@
$proxy = undef,
$port = 8080,
$registry = undef,
+ $jwt_secret = undef,
) {
require_package('nodejs')
diff --git a/modules/cxserver/templates/config.erb
b/modules/cxserver/templates/config.erb
index 65dd7da..49c1087 100644
--- a/modules/cxserver/templates/config.erb
+++ b/modules/cxserver/templates/config.erb
@@ -33,7 +33,11 @@
'mt.apertium.api': '<%= @apertium %>',
<%- if @yandex_url -%>
'mt.yandex.api': '<%= @yandex_url %>',
- 'mt.yandex.key': '<%= @yandex_api_key %>',
+ 'mt.yandex.key': '<%= @yandex_api_key %>'
+ jwt: {
+ secret: '<%= @jwt_secret %>,
+ algorithms: [ 'HS256' ]
+ }
<%- end -%>
<%- if @ordered_registry %>
registry: <%= @ordered_registry %>
--
To view, visit https://gerrit.wikimedia.org/r/247819
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I338070364e5b723274c9627bfae42a1975011a9a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits