{"action":"created","issue":{"url":"https://api.github.com/repos/Stratio/Sparta/issues/1533","repository_url":"https://api.github.com/repos/Stratio/Sparta","labels_url":"https://api.github.com/repos/Stratio/Sparta/issues/1533/labels{/name}","comments_url":"https://api.github.com/repos/Stratio/Sparta/issues/1533/comments","events_url":"https://api.github.com/repos/Stratio/Sparta/issues/1533/events","html_url":"https://github.com/Stratio/Sparta/pull/1533","id":141838469,"number":1533,"title":"[SPARTA-360] [SPARTA-510] Integration with GoSec","user":{"login":"anistal","id":166239,"avatar_url":"https://avatars.githubusercontent.com/u/166239?v=3","gravatar_id":"","url":"https://api.github.com/users/anistal","html_url":"https://github.com/anistal","followers_url":"https://api.github.com/users/anistal/followers","following_url":"https://api.github.com/users/anistal/following{/other_user}","gists_url":"https://api.github.com/users/anistal/gists{/gist_id}","starred_url":"https://api.github.com/users/anistal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anistal/subscriptions","organizations_url":"https://api.github.com/users/anistal/orgs","repos_url":"https://api.github.com/users/anistal/repos","events_url":"https://api.github.com/users/anistal/events{/privacy}","received_events_url":"https://api.github.com/users/anistal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"antonioalf","id":12594504,"avatar_url":"https://avatars.githubusercontent.com/u/12594504?v=3","gravatar_id":"","url":"https://api.github.com/users/antonioalf","html_url":"https://github.com/antonioalf","followers_url":"https://api.github.com/users/antonioalf/followers","following_url":"https://api.github.com/users/antonioalf/following{/other_user}","gists_url":"https://api.github.com/users/antonioalf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonioalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonioalf/subscriptions","organizations_url":"https://api.github.com/users/antonioalf/orgs","repos_url":"https://api.github.com/users/antonioalf/repos","events_url":"https://api.github.com/users/antonioalf/events{/privacy}","received_events_url":"https://api.github.com/users/antonioalf/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-18T11:14:23Z","updated_at":"2016-03-21T14:41:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Stratio/Sparta/pulls/1533","html_url":"https://github.com/Stratio/Sparta/pull/1533","diff_url":"https://github.com/Stratio/Sparta/pull/1533.diff","patch_url":"https://github.com/Stratio/Sparta/pull/1533.patch"},"body":"#### Description\r\nWith this feature you can configure a SSO server. For this purpose you need to follow these steps:\r\n\r\n- Add in your /etc/hosts: \r\n```\r\n10.200.0.56 gosec01.dev.stratio.com\r\n127.0.0.1 anistal\r\n```\r\n- Download the certification from: https://gosec01.dev.stratio.com:9005/cas/login (export Gosec's SSL certification with chrome/firefox/etc.)\r\n- Create cacerts file: \r\n```\r\nkeytool -import -alias ca -file Stratio\\ Inc\\ CA -keystore cacerts -storepass stratio\r\n```\r\n- Run sparta with this option -Djavax.net.ssl.trustStore=/path/to/cacerts\r\n- Configure your application.conf with oauth configuration:\r\n```\r\noauth2 {\r\n  enable = \"true\"\r\n  \r\n  url {\r\n    authorize = \"https://gosec01.dev.stratio.com:9005/cas/oauth2.0/authorize\"\r\n    accessToken = \"https://gosec01.dev.stratio.com:9005/cas/oauth2.0/accessToken\"\r\n    profile = \"https://gosec01.dev.stratio.com:9005/cas/oauth2.0/profile\"\r\n    logout = \"https://gosec01.dev.stratio.com:9005/cas/logout\"\r\n    callBack = \"http://anistal:9090/login\"\r\n    onLoginGoTo = \"/\"\r\n  }\r\n  client{\r\n    id = \"anistal-client\"\r\n    secret = \"fg345vfdefgh4gweb424rtvwg24\"\r\n  }\r\n  cookieName=\"user\"\r\n}\r\n```\r\n- Starts sparta and go to the main page. When it appears you should be redirected to the login page\r\n- Enter username and password: jmgomez/1234 (test user to check).\r\n- The user is logged. If you need to do a logout: http://localhost:9090/logout. The cookie will be removed.\r\n\r\n#### Definition of Done\r\n**GIVEN** a running Sparta instance\r\n**WHEN** you try to access to the main page\r\n**THEN** you should be redirected to the SSO page\r\n\r\n#### Documentation\r\nhttps://stratio.atlassian.net/wiki/display/SPARKTA/6.+Configuration#id-6.Configuration-5.8.Oauth\r\n"},"comment":{"url":"https://api.github.com/repos/Stratio/Sparta/issues/comments/199320115","html_url":"https://github.com/Stratio/Sparta/pull/1533#issuecomment-199320115","issue_url":"https://api.github.com/repos/Stratio/Sparta/issues/1533","id":199320115,"user":{"login":"antonioalf","id":12594504,"avatar_url":"https://avatars.githubusercontent.com/u/12594504?v=3","gravatar_id":"","url":"https://api.github.com/users/antonioalf","html_url":"https://github.com/antonioalf","followers_url":"https://api.github.com/users/antonioalf/followers","following_url":"https://api.github.com/users/antonioalf/following{/other_user}","gists_url":"https://api.github.com/users/antonioalf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonioalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonioalf/subscriptions","organizations_url":"https://api.github.com/users/antonioalf/orgs","repos_url":"https://api.github.com/users/antonioalf/repos","events_url":"https://api.github.com/users/antonioalf/events{/privacy}","received_events_url":"https://api.github.com/users/antonioalf/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T14:41:55Z","updated_at":"2016-03-21T14:41:55Z","body":":shipit:"}}