Cant access Spring Security UI? - grails

I am currently trying to access the GUI for Spring Security UI. I have all the necessary plugins installed as shown below:
cache 1.1.1 -- Cache Plugin
cloud-foundry 1.2.3 -- Cloud Foundry Integration
cloud-support 1.0.11 -- Cloud Support Plugin
codenarc 0.20 -- CodeNarc plugin
constraints 0.6.0 -- Custom domain constraints plugin
csv 0.3.1 -- Grails CSV Plugin
database-migration 1.1 -- Grails Database Migration Plugin
dynamic-config 0.3 -- Dynamic-Config-Plugin
export 1.5 -- Export Plugin
famfamfam 1.0.1 -- Silk icons from famfamfam.com
hibernate 2.1.0 -- Hibernate for Grails
jquery 1.10.2 -- JQuery for Grails
jquery-ui 1.10.3 -- jQuery UI Plugin
jquery-validation 1.9 -- JQuery Validation Plugin
jquery-validation-ui1.4.4 -- JQuery Validation UI Plugin - Client Side Validation without writing JavaScript
kickstart-with-bootstrap0.6.1b -- Kickstart with Bootstrap - Good looking websites!
mail 1.0.1 -- Provides Mail support to a running Grails application
mandrill 0.1 -- Grails Mandrill Plugin
navigation 1.3.2 -- Site Menu Navigation
resources 1.2.7 -- Resources
rest 0.7 -- REST client facilities
settings 1.4 -- Application settings (global constants) plugin
spock 0.7 -- Spock Plugin - spockframework.org
spring-security-core2.0-RC2 -- Spring Security Core Plugin
spring-security-oauth2-provider1.0.5.2 -- OAuth2 Provider support for the Spring Security plugin.
spring-security-ui 1.0-RC1 -- Spring Security UI
tomcat 2.1.0 -- Apache Tomcat plugin for Grails
webxml 1.4.1 -- WebXmlConfig
wslite 0.7.1.0 -- Wslite plugin
Whenever I try to access any of the following URL's I get 404 not found errors:
/user/create
/user
/role/search
etc...
Can someone please help me resolve this issue as I am not receiving any errors and looks to be installed, just cant access it :)
Thanks in advance
****EDIT********
I have also tried to override the domain, so the following command did work which would suggest to me the plugin is installed:
grails s2ui-override user com.mypackage
But when running the application I get this error:
UserController.groovy: 3: unable to resolve class grails.plugin.springsecurity.ui.UserController
Can someone please help me with this as its very confusing and need to recify this issue?
Thanks in advance

I have managed to track down the issue and wanted to share encase anyone else encounters this.
The issue was that I had an old install of Spring Security UI that I used in this project as a local plugin by doing the following in the build config:
grails.plugin.location.'spring-security-ui'='plugins/s2ui'
inherits("global"){
excludes 'spring-security-ui'
}
So the line above that excludes the "spring-security-ui" from being a dependency was the issue, once I removed that, uninstalled and re-installed the plugin it was all good.
Thanks

Related

grails v3, where did platform-core go - i want to use menus in form

just starting a grails v3 project and had an immediate problem ....
I did grails list-plugins but cant see platform-core plugin -
when I try and add to gradle.build it cant resolve the plugin in intellij when you refresh the project. Where has navigations API gone to ?
listing:
airbrake-grails
ajax-tags
ajaxdependancyselection
asset-pipeline
audit-logging
aws-sdk
boselecta
build-test-data
cache
cache-ehcache
cache-headers
cassandra
clojure
csv
database-migration
db-reverse-engineer
enforcer
export
facebook-sdk
feature-switch
feeds
fields
geb
gorm-envers
grails-asset-pipeline
grails-cache
grails-cascade-validation
grails-console
grails-cxf
grails-cxf-client
grails-filterpane
grails-google-visualization
grails-hibernate-filter
grails-http-builder-helper
grails-jesque
grails-json-apis
grails-markdown
grails-quartz
grails-redis
grails-spring-websocket
grails-wschat-plugin
greenmail
grooscript
gscripting
hibernate
http-builder-helper
jasypt-encryption
jenjir
jms
joda-time
jsbdemo
json-annotations-marshaller
jssh
ldap-server
log-hibernate-stats
mail
mongodb
newrelic
oauth
quartz
quartz-monitor
rateable
recaptcha
redis-gorm
rendering
request-tracelog
scaffolding
segment
sentry
simple-spring-security
spring-security-acl
spring-security-appinfo
spring-security-cas
spring-security-core
spring-security-kerberos
spring-security-ldap
spring-security-rest
spring-security-shiro
spring-security-ui
taggable
views-gradle
views-json
views-markup
wkhtmltopdf
wschat

Grails 3.0 and Spring Security

I'm using Grails 3.0.1 with IntelliJ Idea and I'm trying to use Spring Security plugin on my project.
I know that old spring-seurity-core plugin is not compatible with Grails 3.0 version. Thus I've tried to follow this tutorial: http://spiesdavid.blogspot.fi/2015/03/grails-3-app-with-security-part-1.html
I've added the compile line in build.gradle file in dependencies. I've also added the logger line in logback.groovy file.
Problems start after that. There is no such file as SecurityConfiguration.groovy and there is no org.springframework.security package so I can't import them and it gives an error. So I can't create the file either.
So I am assuming that your question is: «How do I get this to work?»
spring security plugin 3.0.0 (for grails 3.x) was released just a few days ago. Documentation is quite good. Start here: https://grails-plugins.github.io/grails-spring-security-core/
There are some problems with Intellij. I tried to add spring security to a slightly older grails project (started with intellij 15.0.1 and grails 3.0.9). Adding the dependencies was successful and rebuilding it made the plugin available, also in the grails console. But when I launched a debug instance of the application directly from the IDE, it would not show spring security among the loaded/installed plugins. I made a pristine project with IntelliJ 15.02, grails 3.0.10 and just copied my code over to the new project. Now it works.
Note there are some issue with IntelliJ not major. do the following it will work:
on your build.gradle add compile 'org.grails.plugins:spring-security-core:3.0.0.M2'
run command compile
run comand s2-quickstart yourAppName User Role
now you should see "application.groovy" file under conf folder
as usual use #Secured annotation in your controller

Cannot create grails projects in STS but from command line

I have recently started to work with grails. I was able to create applications and generate stuff. Yesterday I wanted to resume my work, after a little break and ran into the following error, when trying to create a new project:
Command terminated with an exception:
org.grails.ide.eclipse.longrunning.client.GrailsProcessDiedException: Grails process died
(see details for partial output)
Grails process died
------System.out:-----------
------System.err:-----------
This error only occurs when I use the SpringSourceTool, if I try using the command line it works fine. My first reaction was to change the java version from 1.8 to 1.7, but that didn't help. My environment variables look like this (I am running Fedora Linux 19)
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.0.x86_64
GRAILS_HOME=/home/peer/grails/grails-2.3.0
They are also included in the PATH variable.
Can anybody help? Thanks, Peer
This is a known issue in STS:
https://issuetracker.springsource.com/browse/STS-3277
A work-around is provided in the link.
For anyone pulling their hair out trying to create a grails project using the STS extension for Grails, here is my setup and following is what I did to get it working:
-- OSX 10.8.4 Build 12E3067 --
-- STS Version 3.4.0 --
-- Grails 2.3.3 (installed separately to STS) --
Fresh installed STS 3.4.0
I *de*selected the Preferences/Groovy/Compiler/Enable checking for mismatches between
project and workspace Groovy compiler levels
I ONLY selected the Grails Support option when installing the extensions (nothing else)
Restart STS 3.4.0 (i.e. restart eclipse)
I then pointed my Grails project to my existing Grails 2.3.3 installation
Make sure that the environment variable GRAILS_HOME is set and exported in the same
shell from which you invoke STS otherwise you will get a process termination error in
Eclipse (STS)
This worked.

Spring Security plugin displaying wrong labels in views

I'm having a problem with the Spring Security plugin views, the labels are not correct, as it is shown in the following image:
I have just followed the basic steps:
- Install plugin with
grails install-plugin spring-security-core
Run
grails s2-quickstart org.example SecUser SecRole
Add the following to UrlMappings.groovy:
"/login/$action?"(controller: "login")
"/logout/$action?"(controller: "logout")
Run my app (Liquidaciones).
Go to .../Liquidaciones/login/auth
Why is this happening? I have used this plugin before (a previous version) and I didn't have this problem.
I'm using:
- Grails 2.2.2
- Spring Security Core 1.2.7.3
- IDE: IntelliJ IDEA 12.0
Thanks in advance.
You didn't include your image, but I'm assuming you're seeing http://jira.grails.org/browse/GRAILS-10058 which is fixed in Grails 2.2.3
Now it is working correctly! I didn't tell you my OS is Windows 7. This is what I did:
Uncompress Grails 2.2.3 in my C directory.
Edit the GRAILS_HOME variable changing it to
GRAILS_HOME=C:\grails-2.2.3\
Edit application.properties file, changing Grails version from 2.2.2
to 2.2.3, like this: app.grails.version=2.2.3
Right click in the Liquidaciones (this is my project name) node, select
Grails, select Change SDK version, add and select the Grails
2.2.3 distribution.
After doing this I have my Grails app secured with Spring Security displaying the right labels.
Thanks Burt Beckwith!

list plugins not working

I am trying to list the grails plugins but i get the following output:
C:\Users\User\Documents\NetBeansProjects\Test>grails list-plugins |
Environment set to development..... [Fatal Error]
plugins-list-grailsCentral.xml:564:7: XML document structures must
start and end within the same entity. | Error No plugins found in
repository: grailsCentral. This may be because the r epository is
behind an HTTP proxy.
Plugins available in the grailsCore repository are listed below:
------------------------------------------------------------- dummy <> -- hibernate <1.3.7> -- Hibernate
for Grails tomcat <1.3.7.2> -- Apache Tomcat
plugin for Grails webflow <1.3.7> -- Spring Web
Flow Plugin
Plug-ins you currently have installed are listed below:
------------------------------------------------------------- hibernate 2.0.1 -- Hibernate for Grails jquery
1.7.1 -- JQuery for Grails resources 1.1.6 -- Resources tomcat 2.0.1 -- Apache Tomcat plugin for Grails webxml 1.4.1 --
WebXmlConfig
To find more info about plugin type 'grails plugin-info [NAME]'
Any suggestions how i can fix this?
And i am not behind a HTTP Proxy i am connected to a normal network with a single router.
Someone faced a similar issue and posted on the mailing list. You can look at file ~/.grails/<grailsVersion>/plugins-list-grailsCentral.xml to see what's wrong with your plugin list. Try again in a couple of minutes, the problem should solve from itself.
It seems you're mixing grails 1.3.7 and grails 2.0.1
Make sure you have the same grails version in both the path, the grails_home variable and/or your IDE.

Resources