Rohit Yadav
1c81b241e7
CLOUDSTACK-8505: Don't allow non-POST requests for default login API
...
We add a new contract to pass Http request to authentication plugin system. In
the default login API, we disallow non-POST requests.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 9e9b231672 )
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Conflicts:
api/src/org/apache/cloudstack/api/auth/APIAuthenticator.java
plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java
plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmdTest.java
plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java
plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmdTest.java
server/src/com/cloud/api/ApiServlet.java
server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java
server/src/com/cloud/api/auth/DefaultLogoutAPIAuthenticatorCmd.java
server/test/com/cloud/api/ApiServletTest.java
2015-05-22 11:44:34 +01:00
Rohit Yadav
7ff31f1b22
Merge remote-tracking branch 'origin/inetaddress'
...
- Tested locally against unit tests
- TravisCI build passed: https://travis-ci.org/apache/cloudstack/builds/41990351
- Manual QA passed for basic auth and saml auth using default IDP settings
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Conflicts:
server/src/com/cloud/api/ApiServlet.java
2014-11-25 14:32:09 +05:30
Wido den Hollander
87a7810ade
Fix UnitTest ApiServlet
2014-11-24 11:48:13 +01:00
Laszlo Hornyak
fa52ffad65
unit test for getClientAddress
...
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:48:57 +01:00
Wido den Hollander
4bd49df3f5
Use InetAddress for passing Remote Address instead of String
2014-11-21 12:10:35 +01:00
Rohit Yadav
591a686d77
server: fix server package after auth plugin refactor
...
- Have opensaml dependency to get version from root pom
- add com.cloud.api.auth.APIAuthenticationManagerImpl to spring ctx manager
- Fix getCommands() in APIAuthenticationManagerImpl
- Fix imports in resources, test and src classes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:23 +02:00
Rohit Yadav
f11dcf8ef5
ApiServletTest: Fix test, now login/logout have their own API/class
...
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Laszlo Hornyak
c6d2549939
StringBuffer replaced with StringBuilder in ApiServerService
...
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-03-24 21:04:06 +01:00
Laszlo Hornyak
96d56b7525
Tests for ApiServlet
...
- tests for login
- loginSuccessResponse test for xml and json
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-03-24 19:05:47 +01:00
Laszlo Hornyak
265208a261
Basic tests for ApiServlet
...
new tests for ApiServlet covering
- utf8Fixup
- some of processRequestInContext
minor cleanup done in StringBuffer handling and utf8Fixup got a bit shorter
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-03-22 18:34:46 +01:00