From fb4df5bde54d6aa291ee15ec37b04c54fa81dcdb Mon Sep 17 00:00:00 2001 From: Daniel Nussenbaum Date: Thu, 13 Jun 2019 13:10:26 +0300 Subject: [PATCH 1/3] Fixing configuration setting name for jwt secret key --- spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc | 2 +- .../springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc b/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc index 4d61a3bce..2e965a14f 100644 --- a/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc +++ b/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc @@ -41,7 +41,7 @@ more information about how to configure it. === JWT improvements As of this version, there is no longer a default value for the configuration property -`grails.plugin.springsecurity.conf.rest.token.storage.jwt.secret`. Furthermore, if you are using JWT and no value has +`plugin.springsecurity.rest.token.storage.jwt.secret`. Furthermore, if you are using JWT and no value has been provided for that configuration property, an exception will be thrown during application startup. It is also possible to influence the JWT generation by providing additional claims. Finally, the signing / encryption diff --git a/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy b/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy index 24a013731..6aa0dfee1 100644 --- a/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy +++ b/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy @@ -316,7 +316,7 @@ class SpringSecurityRestGrailsPlugin extends Plugin { !pluginManager.hasGrailsPlugin('springSecurityRestGrailsCache') && !pluginManager.hasGrailsPlugin('springSecurityRestRedis') && !pluginManager.hasGrailsPlugin('springSecurityRestMemcached')) { - throw new Exception("A JWT secret must be defined. Please provide a value for the config property: grails.plugin.springsecurity.conf.rest.token.storage.jwt.secret") + throw new Exception("A JWT secret must be defined. Please provide a value for the config property: plugin.springsecurity.rest.token.storage.jwt.secret") } } From 9c586d3853108c8c7b947b53887fc45cbfd57961 Mon Sep 17 00:00:00 2001 From: daninus14 Date: Thu, 13 Jun 2019 15:27:51 +0300 Subject: [PATCH 2/3] made a mistake and deleted "grails" --- spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc b/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc index 2e965a14f..cbaa8bf74 100644 --- a/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc +++ b/spring-security-rest-docs/src/docs/asciidoc/whatsNew20.adoc @@ -41,7 +41,7 @@ more information about how to configure it. === JWT improvements As of this version, there is no longer a default value for the configuration property -`plugin.springsecurity.rest.token.storage.jwt.secret`. Furthermore, if you are using JWT and no value has +`grails.plugin.springsecurity.rest.token.storage.jwt.secret`. Furthermore, if you are using JWT and no value has been provided for that configuration property, an exception will be thrown during application startup. It is also possible to influence the JWT generation by providing additional claims. Finally, the signing / encryption @@ -55,4 +55,4 @@ algorithms used are configurable. Check the <> section for more * Snapshots are now published automatically to https://oss.jfrog.org[Artifactory OSS] on every successful build. You can use them by defining this Maven repository inside the `repositories` block in your `build.gradle`: - maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" } \ No newline at end of file + maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" } From 33c4059d6c192483e5ab88ab451611a859f02c10 Mon Sep 17 00:00:00 2001 From: daninus14 Date: Thu, 13 Jun 2019 15:28:49 +0300 Subject: [PATCH 3/3] made a mistake and deleted "grails" from name --- .../springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy b/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy index 6aa0dfee1..f12b22705 100644 --- a/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy +++ b/spring-security-rest/src/main/groovy/grails/plugin/springsecurity/rest/SpringSecurityRestGrailsPlugin.groovy @@ -316,7 +316,7 @@ class SpringSecurityRestGrailsPlugin extends Plugin { !pluginManager.hasGrailsPlugin('springSecurityRestGrailsCache') && !pluginManager.hasGrailsPlugin('springSecurityRestRedis') && !pluginManager.hasGrailsPlugin('springSecurityRestMemcached')) { - throw new Exception("A JWT secret must be defined. Please provide a value for the config property: plugin.springsecurity.rest.token.storage.jwt.secret") + throw new Exception("A JWT secret must be defined. Please provide a value for the config property: grails.plugin.springsecurity.rest.token.storage.jwt.secret") } }