I have a domain class called Profile. I tried to access its properties in the following code:
Profile p = new Profile()
// doing some changes
p.name = 'Larry'
//....
p.save(flush:true)
// then I print out the properties, and this line of code raises warning.
print p.properties
Then the following warning message shows up:
WARN security.Security - An attempt was made to use the grailsSecurity bean, but there is no security bridge implementation defined. You must install a security plugin and/or provide a grailsSecurityBridge bean.
I do have a spring-security plugin. So I'm not so sure about the meaning of this security issue. A different security plugin?
I cannot find any information related to this issue. Could someone help me please? Thank you!
I did a search on "grailsSecurityBridge bean". The results led me to the Grails plugin platform-core:1.0.RC5, which was installed in my application.
So I created another project and tried to access the profile properties with and without the plugin. And the result showed that the plugin was the cause.
I'm not sure if I need this plugin in my application but at least I know the cause now.
Update:
I'm using another plugin "email confirmation" which depends on the platform-core plugin. So uninstall the platform-plugin is not the solution.
Instead, we should implement the graisSecurityBridge bean. Just follow the following links:
http://grailsrocks.github.io/grails-platform-core/guide/security.html#security_implementing_bridge
http://grailsrocks.com/blog/2012/03/28/hooking-up-platform-core-security-api-to-your-security-provider
Related
I am trying to have SCM Manager accept users from my organization so they can log in using their Windows username and password. I have installed the LDAP plugin, but it still doesn't recognize my own windows username and password from my organization
I don't really understand - I think I shouldn't even need LDAP and some kind of basic authentication should be able to figure out my username password on windows active directory etc type of thing...
Do I need the SSL to do this? It says various things about a binding problem.
I am using the custom LDAP profile. I put wsproxy in the proxy server area and enabled. I have no idea what that means but it was the same configuration that I saw in a previous installation of SCM-server that worked with organizational credentials on windows server.
This problem occurred after upgrading from version 1.6 to 2.9.
Though I was not the person who set it up on v1.6.
UPDATE: what's needed is not LDAP plugin, but rather understanding how to configure active directory for SCM - previously, in 1.X versions active directory plugin worked under the hood - now it needs to be configured and I have no idea how -- also the active directory plugin for 1.X is no longer available - if you could provide me with that code I might be able to see how it connects to AD and then go from there on version 2.X - any chance you can get me access to the code of https://bitbucket.org/sdorra/scm-manager/wiki/active-directory-plugin??
We have an issue for the LDAP plugin saying that the migration of the ldap password may fail (though I cannot reproduce this), so maybe this happened with your migration, too. Proxy settings should not play any part in this game, because as far as I know company ldaps aren't behind a proxy.
The configuration for 2.x should be the same as for 1.60. We haven't changed anything here. So first I would try to reenter the "Connection Password". If this still fails, please use the "Test connection" feature. Enter a valid authentication here. This tells you, on what level the connection fails and may show you an exception with further information.
Feel free to post your results here for further investigation.
I am trying to use 2.0.0-M1 version of grails plugin for neo4j but when i try to save any entity,it is giving me error :
The instance was updated by another user while you were editing. Stacktrace follows: org.grails.datastore.mapping.core.OptimisticLockingException: The instance was updated by another user while you were editing at org.grails.datastore.gorm.neo4j.NodePendingUpdate.run(NodePendingUpdate.java:83)
and if i try to use 2.0.0-M2 version,i got error :
groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.startsWith() is applicable for argument types: (java.lang.String) values: [jdbc:neo4j:instance:]
Also tell me if 2.0.0-M2 is supporting rest or not.
Please reply fast.
Configuration has changed significantly from M1 to M2. Internally the plugin now uses the Neo4j JDBC driver. I didn't yet found enough time to update the docs, in the meantime refer to https://github.com/sarmbruster/neo4jsample/blob/neo4j_2.0/grails-app/conf/DataSource.groovy for a valid sample config.
The error you're mentioning seems to be caused by a incorrect configuration.
M2 is capable of working with remote database, just set datasource.url="jdbc:neo4j://localhost:7474/", see https://github.com/sarmbruster/neo4jsample/blob/neo4j_2.0/grails-app/conf/DataSource.groovy#L13
So I have an application that works perfectly on my desktop, and also works perfectly when deployed to tomcat on a windows machine. However, when I attempt to use this application while deployed on the same version of tomcat, but on AIX, it fails to retrieve data out of LDAP.
A user is able to successfully authenticate, but the context is null. DirContextOperations is passed into my ContextMapper as null. Does anyone know what ports that need to be open to get this data or what other configuration may need to be done? Based on what I am seeing it has to be a server configuration issue somewhere.
If you are using Spring Security LDAP plugin then it will be easy to co-relate the below mentioned configuration in AIX with the app. I prepared few snapshots for the configuration so that I do not clutter the answer space here. Have a look at LDAP config in AIX and try to setup the same in AIX Server.
Now coming to the LDAP plugin, there is nothing much other than setting up a bunch of properties is required. Values for these properties will be available once the LDAP configuration is done in AIX (as mentioned in the above mentioned slide).
Note:-
After creating a standalone LDAP, you might need to add realm if the user is associated to a group. I have not mentioned the same in the slides since I do not have an active LDAP host available now.
UPDATE
Instead of using BindAuthenticator can you try switching to PasswordComparisonAuthenticator for authentication.
Using the below setting in Config forces to use PasswordComparisonAuthenticator to authenticate and return back the DirContextOperations. Can this setting be tried?
grails.plugins.springsecurity.ldap.authenticator.useBind = false
#Refer LdapAuthentication Implementations.
I am not sure if this will be the answer in your case. I was also getting null in DirContextOperations object when trying to obtain values from Active Directory.
I was trying to get ldap attributes like this as the Grails LDAP plugin Documentation states:
String mail = ctx.originalAttrs.attrs['mail'].values[0]
and all those were null. So I have changed the line above for this one instead and it works for me:
String mail = ctx.attributes.getAt('mail').values[0].toString()
I am working with the Grails Authentication plugin and trying to add a domain class from the plugin into my GORM. I am able to use plugin objects in my application when importing them with, "import com.grailsrocks.authentication.AuthenticationUser", but getting "unable to resolve class" exception when trying to access my application objects from the plugin (I am trying to use the domain class "User" and my import command is "import blap.User" - package name is blap). Both import commands work from the shell, and the import statement is not triggering an error in STS.
I am new to grails, so I'm probably doing something very wrong. But, at this point I am running out of ideas, so any help would be greatly appreciated. Thanks!
Vitaly
While I haven't used the Grails Authentication plugin before, I don't think you should be modifying the plugin classes. In general, you should extend the plugin class you want to modify in your application and use your application class instead.
Actually, from reading the docs, it looks like you should use the event handling to modify the plugin behavior.
From the plugin docs:
The default AuthenticationUser domain class is minimal. If you want to change constraints or add fields (you may consider using a separate class instead for extra user data) you just redefine the onNewUserObject event and return your own instance of a domain class or similar wrapper around another authentication database such as LDAP
i have service to send sms to the mobile through Application. I am getting the follwing error.
2011-06-06 19:37:35,729 [http-8080-2] ERROR sipgate.SipgateService - Server returned HTTP response code: 401 for URL: https://samurai.sipgate.net/RPC2
This probably means you are using an invalid username or password
Have you set up the config as explained on the plugin page (at the top of the documentation)?
I also assume that this means your earlier problem was solved... Can you accept the answer if my answer helped, or explain what you did to fix it if it did not?
I agree with Tim. You can only log in, if your Sipgate-Registration was verified by Sipgate.
Points, which you can check to see if your account is not working:
Try to log in on the sipgate.de webpage
Use the Perl-Client given here: http://www.sipgate.de/basic/api
The client can be downloaded at this location:http://www.sipgate.de/beta/public/static/downloads/basic/api/sipgate_api_perl_examples.zip
Hopefully you should not be able to do at least one of these things. Then you know you have to talk to the support # sipgate
The documentation on the plugin-page says, you have to have a 'conf/Config.groovy'-file. This means that you should have the basic Config.groovy file in the folder 'grails-app/conf/', which ships with every Grails installation. So my guess is that you might have created a different Config.groovy-file. So better check on the Config.groovy-file. The SMS-plugin should have generated some placeholders for you, where you need to enter your sipgate-account-data.