4 Security - Reference Documentation
Authors: Burt Beckwith
4 SecurityYou need to provide the Cloud Foundry API credentials to access data and files from your deployed applications, and there are a few options for this. One is to leave them in
Config.groovysince they need to be there to run the command-line scripts. This way they'll be included in the war file and available for use when deployed.Another option is to put the username and password values in
$HOME/.grails/settings.groovy. This avoids storing the password in source control, and by default will generate a properties file in the war that will be read when deployed for authentication.If you'd prefer not to include the username and password in either
Config.groovyor the generated properties file, add the configuration option
grails.plugin.cloudfoundry.requireLogin = trueto
Config.groovy. This will avoid generating the properties file and trigger a redirect to a login page in the deployed application when you attempt to access an action that requires API access. This will be in addition to any standard authentication system you are already using, e.g. with the Spring Security plugin.