Permalink
Browse files

Merge branch 'releases/4.8.0'

  • Loading branch information...
2 parents 1d29a24 + 3297e5a commit 391163ebad397b8f3eb5298aa01412dd94c9a176 @fhanik fhanik committed Dec 4, 2017
Showing with 7,043 additions and 1,289 deletions.
  1. +1 −0 build.gradle
  2. +1 −1 gradle.properties
  3. +51 −0 model/src/main/java/org/cloudfoundry/identity/uaa/mfa/AbstractMfaProviderConfig.java
  4. +18 −3 model/src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GoogleMfaProviderConfig.java
  5. +34 −17 model/src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/MfaProvider.java
  6. +107 −0 model/src/main/java/org/cloudfoundry/identity/uaa/mfa/UserGoogleMfaCredentials.java
  7. +0 −43 model/src/main/java/org/cloudfoundry/identity/uaa/mfa_provider/AbstractMfaProviderConfig.java
  8. +0 −8 model/src/main/java/org/cloudfoundry/identity/uaa/mfa_provider/MfaProviderDeserializer.java
  9. +9 −0 .../src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/SamlServiceProviderDefinition.java
  10. +11 −0 model/src/main/java/org/cloudfoundry/identity/uaa/zone/IdentityZoneConfiguration.java
  11. +56 −0 model/src/main/java/org/cloudfoundry/identity/uaa/zone/MfaConfig.java
  12. +1 −1 ...src/test/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GoogleMfaProviderConfigTest.java
  13. +26 −9 model/src/test/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/MfaProviderTest.java
  14. +3 −0 server/build.gradle
  15. +2 −1 server/src/main/java/org/cloudfoundry/identity/uaa/audit/AuditEventType.java
  16. +21 −4 server/src/main/java/org/cloudfoundry/identity/uaa/audit/event/SystemDeletable.java
  17. +16 −0 ...rc/main/java/org/cloudfoundry/identity/uaa/authentication/MfaAuthenticationRequiredException.java
  18. +2 −2 server/src/main/java/org/cloudfoundry/identity/uaa/authentication/PasscodeAuthenticationFilter.java
  19. +7 −13 ...rc/main/java/org/cloudfoundry/identity/uaa/authentication/manager/AuthzAuthenticationManager.java
  20. +2 −1 ...a/org/cloudfoundry/identity/uaa/authentication/manager/DynamicZoneAwareAuthenticationManager.java
  21. +76 −0 server/src/main/java/org/cloudfoundry/identity/uaa/db/DatabaseUrlModifier.java
  22. +20 −0 server/src/main/java/org/cloudfoundry/identity/uaa/db/Vendor.java
  23. +40 −7 server/src/main/java/org/cloudfoundry/identity/uaa/health/HealthzEndpoint.java
  24. +5 −0 server/src/main/java/org/cloudfoundry/identity/uaa/impl/config/YamlServletProfileInitializer.java
  25. +0 −1 .../src/main/java/org/cloudfoundry/identity/uaa/login/AccountSavingAuthenticationSuccessHandler.java
  26. +1 −1 server/src/main/java/org/cloudfoundry/identity/uaa/login/LoginInfoEndpoint.java
  27. +146 −0 server/src/main/java/org/cloudfoundry/identity/uaa/login/TotpEndpoint.java
  28. +15 −5 server/src/main/java/org/cloudfoundry/identity/uaa/login/UaaAuthenticationFailureHandler.java
  29. +46 −15 server/src/main/java/org/cloudfoundry/identity/uaa/metrics/UaaMetricsFilter.java
  30. +3 −1 ...src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GeneralMfaProviderValidator.java
  31. +23 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/GoogleAuthenticatorAdapter.java
  32. +4 −2 ...ain/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GoogleMfaProviderConfigValidator.java
  33. +58 −18 ...src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/JdbcMfaProviderProvisioning.java
  34. +139 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/JdbcUserGoogleMfaCredentialsProvisioning.java
  35. +75 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/MfaProviderBootstrap.java
  36. +3 −1 .../src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/MfaProviderConfigValidator.java
  37. +122 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/MfaProviderEndpoints.java
  38. +15 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/MfaProviderProvisioning.java
  39. +1 −1 server/src/main/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/MfaProviderValidator.java
  40. +53 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/MfaRegisterQRGenerator.java
  41. +92 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/UserGoogleMfaCredentialsProvisioning.java
  42. +8 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/UserMfaCredentialsProvisioning.java
  43. +1 −1 ...g/cloudfoundry/identity/uaa/{mfa_provider → mfa/exception}/InvalidMfaProviderConfigException.java
  44. +1 −1 ...ava/org/cloudfoundry/identity/uaa/{mfa_provider → mfa/exception}/InvalidMfaProviderException.java
  45. +7 −7 ...y/uaa/{resources/jdbc/DefaultLimitSqlAdapter.java → mfa/exception/MfaAlreadyExistsException.java}
  46. +7 −0 server/src/main/java/org/cloudfoundry/identity/uaa/mfa/exception/MfaProviderUpdateIsNotAllowed.java
  47. +7 −0 ...rc/main/java/org/cloudfoundry/identity/uaa/mfa/exception/UserMfaConfigAlreadyExistsException.java
  48. +7 −0 ...src/main/java/org/cloudfoundry/identity/uaa/mfa/exception/UserMfaConfigDoesNotExistException.java
  49. +0 −60 server/src/main/java/org/cloudfoundry/identity/uaa/mfa_provider/MfaProviderEndpoints.java
  50. +0 −8 server/src/main/java/org/cloudfoundry/identity/uaa/mfa_provider/MfaProviderProvisioning.java
  51. +20 −4 server/src/main/java/org/cloudfoundry/identity/uaa/oauth/TokenRevocationEndpoint.java
  52. +48 −0 server/src/main/java/org/cloudfoundry/identity/uaa/oauth/event/TokenRevocationEvent.java
  53. +14 −0 server/src/main/java/org/cloudfoundry/identity/uaa/oauth/event/TokenRevocationEventPublisher.java
  54. +37 −8 server/src/main/java/org/cloudfoundry/identity/uaa/oauth/token/JdbcRevocableTokenProvisioning.java
  55. +0 −13 server/src/main/java/org/cloudfoundry/identity/uaa/provider/JdbcIdentityProviderProvisioning.java
  56. +14 −1 server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/SamlConfigurationBean.java
  57. +26 −1 server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpWebSsoProfileImpl.java
  58. +32 −0 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/HsqlDbLimitSqlAdapter.java
  59. +6 −2 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/LimitSqlAdapter.java
  60. +22 −6 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/LimitSqlAdapterFactory.java
  61. +28 −0 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/MySqlLimitSqlAdapter.java
  62. +5 −1 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/OracleLimitSqlAdapter.java
  63. +36 −0 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/PostgresLimitSqlAdapter.java
  64. +13 −0 server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/SQLServerLimitSqlAdapter.java
  65. +0 −6 server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
  66. +0 −6 server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimUserProvisioning.java
  67. +11 −9 server/src/main/java/org/cloudfoundry/identity/uaa/util/CachingPasswordEncoder.java
  68. +200 −0 server/src/main/java/org/cloudfoundry/identity/uaa/util/LowConcurrencyPasswordEncoder.java
  69. +38 −3 server/src/main/java/org/cloudfoundry/identity/uaa/web/LimitedModeUaaFilter.java
  70. +9 −9 server/src/main/java/org/cloudfoundry/identity/uaa/web/RecognizeFailureDispatcherServlet.java
  71. +27 −0 server/src/main/java/org/cloudfoundry/identity/uaa/web/SessionIdleTimeoutSetter.java
  72. +13 −1 ...r/src/main/java/org/cloudfoundry/identity/uaa/zone/GeneralIdentityZoneConfigurationValidator.java
  73. +1 −1 server/src/main/java/org/cloudfoundry/identity/uaa/zone/GeneralIdentityZoneValidator.java
  74. +1 −1 server/src/main/java/org/cloudfoundry/identity/uaa/zone/IdentityZoneConfigurationValidator.java
  75. +20 −19 server/src/main/java/org/cloudfoundry/identity/uaa/zone/IdentityZoneEndpoints.java
  76. +0 −17 server/src/main/java/org/cloudfoundry/identity/uaa/zone/JdbcIdentityZoneProvisioning.java
  77. +31 −0 server/src/main/java/org/cloudfoundry/identity/uaa/zone/MfaConfigValidator.java
  78. +0 −12 server/src/main/java/org/cloudfoundry/identity/uaa/zone/MultitenantJdbcClientDetailsService.java
  79. +6 −0 ...ain/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_7_2__Add_Google_Mfa_User_Creds_Table.sql
  80. +1 −0 ...rc/main/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_7_3__Remove_Mfa_Providers_Active.sql
  81. +1 −0 server/src/main/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_8_0__UniqueMfaName.sql
  82. +1 −0 ...main/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_8_1__AddMfaProviderToUserCredsTable.sql
  83. +1 −0 ...er/src/main/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_8_2__AddZoneToUserCredsTable.sql
  84. +2 −0 .../src/main/resources/org/cloudfoundry/identity/uaa/db/hsqldb/V4_8_3__SwapMfaUserCredPrimaryKey.sql
  85. +7 −0 ...main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_7_2__Add_Google_Mfa_User_Creds_Table.sql
  86. +1 −0 ...src/main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_7_3__Remove_Mfa_Providers_Active.sql
  87. +1 −0 server/src/main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_8_0__UniqueMfaName.sql
  88. +1 −0 .../main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_8_1__AddMfaProviderToUserCredsTable.sql
  89. +1 −0 server/src/main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_8_2__AddZoneToUserCredsTable.sql
  90. +2 −0 ...r/src/main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_8_3__SwapMfaUserCredPrimaryKey.sql
  91. +7 −0 ...resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_7_2__Add_Google_Mfa_User_Creds_Table.sql
  92. +1 −0 ...ain/resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_7_3__Remove_Mfa_Providers_Active.sql
  93. +1 −0 server/src/main/resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_8_0__UniqueMfaName.sql
  94. +1 −0 .../resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_8_1__AddMfaProviderToUserCredsTable.sql
  95. +1 −0 ...rc/main/resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_8_2__AddZoneToUserCredsTable.sql
  96. +2 −0 .../main/resources/org/cloudfoundry/identity/uaa/db/postgresql/V4_8_3__SwapMfaUserCredPrimaryKey.sql
  97. +7 −0 .../resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_7_2__Add_Google_Mfa_User_Creds_Table.sql
  98. +1 −0 ...main/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_7_3__Remove_Mfa_Providers_Active.sql
  99. +1 −0 server/src/main/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_8_0__UniqueMfaName.sql
  100. +1 −0 ...n/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_8_1__AddMfaProviderToUserCredsTable.sql
  101. +1 −0 ...src/main/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_8_2__AddZoneToUserCredsTable.sql
  102. +13 −0 ...c/main/resources/org/cloudfoundry/identity/uaa/db/sqlserver/V4_8_3__SwapMfaUserCredPrimaryKey.sql
  103. +9 −1 server/src/main/resources/spring/data-source.xml
  104. +4 −4 server/src/main/resources/spring/env.xml
  105. +48 −1 server/src/main/resources/spring/login-ui.xml
  106. +1 −1 server/src/main/resources/templates/web/idp_discovery/account_chooser.html
  107. +1 −1 server/src/main/resources/templates/web/idp_discovery/email.html
  108. +1 −1 server/src/main/resources/templates/web/idp_discovery/password.html
  109. +1 −1 ...src/main/resources/templates/web/layouts/{pivotal-ui-main.html → pui-account-discovery-main.html}
  110. +63 −0 server/src/main/resources/templates/web/layouts/pui-mfa-main.html
  111. +49 −0 server/src/main/resources/templates/web/mfa/enter_code.html
  112. +48 −0 server/src/main/resources/templates/web/mfa/qr_code.html
  113. +15 −0 server/src/test/java/org/cloudfoundry/identity/uaa/audit/event/SystemDeletableTest.java
  114. +16 −1 ...st/java/org/cloudfoundry/identity/uaa/authentication/manager/AuthzAuthenticationManagerTests.java
  115. +17 −0 server/src/test/java/org/cloudfoundry/identity/uaa/config/YamlServletProfileInitializerTests.java
  116. +100 −0 server/src/test/java/org/cloudfoundry/identity/uaa/db/DatabaseParametersTests.java
  117. +76 −0 server/src/test/java/org/cloudfoundry/identity/uaa/db/GoogleAuthUserConfigTableTest.java
  118. +202 −0 server/src/test/java/org/cloudfoundry/identity/uaa/login/TotpEndpointTest.java
  119. +14 −2 server/src/test/java/org/cloudfoundry/identity/uaa/login/UaaAuthenticationFailureHandlerTests.java
  120. +3 −3 server/src/test/java/org/cloudfoundry/identity/uaa/login/UaaResetPasswordServiceTests.java
  121. +73 −12 server/src/test/java/org/cloudfoundry/identity/uaa/metrics/UaaMetricsFilterTests.java
  122. +7 −8 ...test/java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GeneralMfaProviderValidatorTest.java
  123. +2 −1 ...java/org/cloudfoundry/identity/uaa/{mfa_provider → mfa}/GoogleMfaProviderConfigValidatorTest.java
  124. +176 −0 server/src/test/java/org/cloudfoundry/identity/uaa/mfa/JdbcMfaProviderProvisioningTest.java
  125. +148 −0 ...src/test/java/org/cloudfoundry/identity/uaa/mfa/JdbcUserGoogleMfaCredentialsProvisioningTest.java
  126. +134 −0 server/src/test/java/org/cloudfoundry/identity/uaa/mfa/MfaProviderBootstrapTest.java
  127. +130 −0 server/src/test/java/org/cloudfoundry/identity/uaa/mfa/MfaProviderEndpointsTest.java
  128. +109 −0 server/src/test/java/org/cloudfoundry/identity/uaa/mfa/MfaRegisterQRGeneratorTest.java
  129. +198 −0 server/src/test/java/org/cloudfoundry/identity/uaa/mfa/UserGoogleMfaCredentialsProvisioningTest.java
  130. +0 −62 server/src/test/java/org/cloudfoundry/identity/uaa/mfa_provider/JdbcMfaProviderProvisioningTest.java
  131. +0 −51 server/src/test/java/org/cloudfoundry/identity/uaa/mfa_provider/MfaProviderEndpointsTest.java
  132. +2 −1 server/src/test/java/org/cloudfoundry/identity/uaa/oauth/TokenRevocationEndpointTests.java
  133. +1 −1 ...r/src/test/java/org/cloudfoundry/identity/uaa/oauth/token/JdbcRevocableTokenProvisioningTest.java
  134. +146 −0 server/src/test/java/org/cloudfoundry/identity/uaa/oauth/token/LargeRevocableTokenDeleteTests.java
  135. +70 −0 server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/SamlConfigurationBeanTest.java
  136. +17 −6 server/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpWebSsoProfileImplTest.java
  137. +23 −3 .../test/java/org/cloudfoundry/identity/uaa/provider/saml/idp/SamlServiceProviderDefinitionTest.java
  138. +21 −13 server/src/test/java/org/cloudfoundry/identity/uaa/resources/jdbc/LimitSqlAdapterFactoryTest.java
  139. +69 −0 server/src/test/java/org/cloudfoundry/identity/uaa/resources/jdbc/LimitSqlAdapterTests.java
  140. +0 −108 server/src/test/java/org/cloudfoundry/identity/uaa/test/IntegrationTestContextLoader.java
  141. +1 −0 server/src/test/java/org/cloudfoundry/identity/uaa/test/TestUtils.java
  142. +8 −1 ...test/java/org/cloudfoundry/identity/uaa/test/YamlServletProfileInitializerContextInitializer.java
  143. +17 −0 server/src/test/java/org/cloudfoundry/identity/uaa/util/CachingPasswordEncoderTest.java
  144. +144 −0 server/src/test/java/org/cloudfoundry/identity/uaa/util/LowConcurrencyPasswordEncoderTests.java
  145. +40 −5 server/src/test/java/org/cloudfoundry/identity/uaa/web/HealthzEndpointTests.java
  146. +53 −6 server/src/test/java/org/cloudfoundry/identity/uaa/web/LimitedModeUaaFilterTests.java
  147. +11 −12 server/src/test/java/org/cloudfoundry/identity/uaa/web/RecognizeFailureDispatcherServletTest.java
  148. +49 −0 server/src/test/java/org/cloudfoundry/identity/uaa/web/SessionIdleTimeoutSetterTest.java
  149. +46 −25 .../test/java/org/cloudfoundry/identity/uaa/zone/GeneralIdentityZoneConfigurationValidatorTests.java
  150. +1 −1 server/src/test/java/org/cloudfoundry/identity/uaa/zone/GeneralIdentityZoneValidatorTests.java
  151. +70 −0 server/src/test/java/org/cloudfoundry/identity/uaa/zone/MfaConfigValidatorTests.java
  152. +17 −15 shared_versions.gradle
  153. +24 −1 statsd/src/main/java/org/cloudfoundry/identity/statsd/Application.java
  154. +6 −0 statsd/src/main/java/org/cloudfoundry/identity/statsd/MetricsUtils.java
  155. +50 −0 statsd/src/main/java/org/cloudfoundry/identity/statsd/UaaMetricsEmitter.java
  156. +164 −1 statsd/src/test/java/org/cloudfoundry/identity/statsd/UaaMetricsEmitterTests.java
  157. +10 −0 statsd/src/test/java/org/cloudfoundry/identity/statsd/integration/IntegrationTestUtils.java
  158. +36 −15 statsd/src/test/java/org/cloudfoundry/identity/statsd/integration/UaaMetricsEmitterIT.java
  159. +1 −1 uaa/build.gradle
  160. +4 −0 uaa/slate/source/stylesheets/screen.css.scss
  161. +153 −33 uaa/slateCustomizations/source/index.html.md.erb
  162. +0 −1 uaa/src/main/resources/uaa.yml
  163. +28 −4 uaa/src/main/webapp/WEB-INF/spring-servlet.xml
  164. +58 −0 uaa/src/main/webapp/WEB-INF/spring/mfa-endpoints.xml
  165. +0 −28 uaa/src/main/webapp/WEB-INF/spring/multitenant-endpoints.xml
  166. +4 −0 uaa/src/main/webapp/WEB-INF/spring/oauth-endpoints.xml
  167. +1 −0 uaa/src/main/webapp/WEB-INF/spring/scim-endpoints.xml
  168. +0 −14 uaa/src/main/webapp/resources/oss/stylesheets/chooser.css
  169. +10 −0 uaa/src/main/webapp/resources/oss/stylesheets/mfa.css
  170. +14 −0 uaa/src/main/webapp/resources/oss/stylesheets/pui-3.0.0/flexbox.css
  171. +6 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/BootstrapTests.java
  172. +83 −0 ...src/test/java/org/cloudfoundry/identity/uaa/integration/MfaProviderEndpointsIntegrationTests.java
  173. +228 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/TotpEndpointIntegrationTests.java
  174. +7 −23 uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/LoginIT.java
  175. +0 −49 uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/MfaIT.java
  176. +25 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/util/IntegrationTestUtils.java
  177. +2 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/invitations/InvitationsEndpointDocs.java
  178. +40 −1 uaa/src/test/java/org/cloudfoundry/identity/uaa/login/BootstrapTests.java
  179. +39 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/login/LoginMockMvcTests.java
  180. +73 −7 uaa/src/test/java/org/cloudfoundry/identity/uaa/login/TokenEndpointDocs.java
  181. +292 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/login/TotpEndpointMockMvcTests.java
  182. +7 −1 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/DefaultConfigurationTestSuite.java
  183. +2 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/clients/ClientAdminEndpointsDocs.java
  184. +16 −8 ...c/test/java/org/cloudfoundry/identity/uaa/mock/limited/LimitedModeJwtBearerGrantMockMvcTests.java
  185. +11 −6 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/limited/LimitedModeLoginMockMvcTests.java
  186. +11 −5 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/limited/LimitedModeNegativeTests.java
  187. +14 −9 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/limited/LimitedModeTokenMockMvcTests.java
  188. +16 −8 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/limited/LimitedModeUserTokenMockMvcTests.java
  189. +0 −109 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/mfa_provider/MfaProviderEdpointsDocs.java
  190. +208 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/mfa_provider/MfaProviderEndpointsDocs.java
  191. +0 −123 ...rc/test/java/org/cloudfoundry/identity/uaa/mock/mfa_provider/MfaProviderEndpointsMockMVCTest.java
  192. +313 −0 ...c/test/java/org/cloudfoundry/identity/uaa/mock/mfa_provider/MfaProviderEndpointsMockMvcTests.java
  193. +2 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/password/PasswordEndpointsDocs.java
  194. +10 −10 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/providers/IdentityProviderEndpointsDocs.java
  195. +208 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/saml/SamlAuthenticationMockMvcTests.java
  196. +60 −0 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/session/SessionIdleTimeoutMockMvcTest.java
  197. +8 −9 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/token/TokenKeyEndpointDocs.java
  198. +49 −1 ...ntity/uaa/mock/token/{TokenRevocationEndpointTest.java → TokenRevocationEndpointMockMvcTest.java}
  199. +36 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/util/MockMvcUtils.java
  200. +14 −2 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/zones/IdentityZoneEndpointDocs.java
  201. +95 −18 uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/zones/IdentityZoneEndpointsMockMvcTests.java
  202. +0 −46 uaa/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/SamlConfigurationBeanTest.java
  203. +1 −1 ...dfoundry/identity/uaa/provider/saml/{SamlMockMvcTests.java → SamlInitializationMockMvcTests.java}
  204. +53 −17 uaa/src/test/java/org/cloudfoundry/identity/uaa/provider/saml/UaaSamlIDPDocs.java
  205. +2 −2 ...est/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimExternalGroupMappingsEndpointsDocs.java
  206. +3 −3 uaa/src/test/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimGroupEndpointsDocs.java
  207. +20 −20 uaa/src/test/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimUserEndpointDocs.java
  208. +18 −2 uaa/src/test/resources/test/bootstrap/all-properties-set.yml
View
@@ -277,6 +277,7 @@ cargo {
}
systemProperties {
property 'spring.profiles.active', System.getProperty('spring.profiles.active', 'default')
+ property 'metrics.perRequestMetrics', System.getProperty('metrics.perRequestMetrics', 'true')
}
installer {
View
@@ -1 +1 @@
-version=4.7.2
+version=4.8.0
@@ -0,0 +1,51 @@
+/*
+ * ****************************************************************************
+ * Cloud Foundry
+ * Copyright (c) [2009-2017] Pivotal Software, Inc. All Rights Reserved.
+ *
+ * This product is licensed to you under the Apache License, Version 2.0 (the "License").
+ * You may not use this product except in compliance with the License.
+ *
+ * This product includes a number of subcomponents with
+ * separate copyright notices and license terms. Your use of these
+ * subcomponents is subject to the terms and conditions of the
+ * subcomponent's license, as noted in the LICENSE file.
+ * ****************************************************************************
+ */
+
+package org.cloudfoundry.identity.uaa.mfa;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AbstractMfaProviderConfig {
+ private String issuer;
+
+ public abstract void validate();
+
+ public String getIssuer() {
+ return issuer;
+ }
+
+ public AbstractMfaProviderConfig setIssuer(String issuer) {
+ this.issuer = issuer;
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ AbstractMfaProviderConfig that = (AbstractMfaProviderConfig) o;
+
+ return issuer != null ? issuer.equals(that.issuer) : that.issuer == null;
+ }
+
+ @Override
+ public int hashCode() {
+ return issuer != null ? issuer.hashCode() : 0;
+ }
+}
@@ -1,4 +1,19 @@
-package org.cloudfoundry.identity.uaa.mfa_provider;
+/*
+ * ****************************************************************************
+ * Cloud Foundry
+ * Copyright (c) [2009-2017] Pivotal Software, Inc. All Rights Reserved.
+ *
+ * This product is licensed to you under the Apache License, Version 2.0 (the "License").
+ * You may not use this product except in compliance with the License.
+ *
+ * This product includes a number of subcomponents with
+ * separate copyright notices and license terms. Your use of these
+ * subcomponents is subject to the terms and conditions of the
+ * subcomponent's license, as noted in the LICENSE file.
+ * ****************************************************************************
+ */
+
+package org.cloudfoundry.identity.uaa.mfa;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -10,7 +25,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class GoogleMfaProviderConfig extends AbstractMfaProviderConfig<GoogleMfaProviderConfig> {
+public class GoogleMfaProviderConfig extends AbstractMfaProviderConfig {
public enum Algorithm {
SHA256,
@@ -27,7 +42,7 @@
return namesMap.get(value);
}
- public static Set<String> getStringaValues() {
+ public static Set<String> getStringValues() {
return namesMap.keySet();
}
@@ -1,4 +1,19 @@
-package org.cloudfoundry.identity.uaa.mfa_provider;
+/*
+ * ****************************************************************************
+ * Cloud Foundry
+ * Copyright (c) [2009-2017] Pivotal Software, Inc. All Rights Reserved.
+ *
+ * This product is licensed to you under the Apache License, Version 2.0 (the "License").
+ * You may not use this product except in compliance with the License.
+ *
+ * This product includes a number of subcomponents with
+ * separate copyright notices and license terms. Your use of these
+ * subcomponents is subject to the terms and conditions of the
+ * subcomponent's license, as noted in the LICENSE file.
+ * ****************************************************************************
+ */
+
+package org.cloudfoundry.identity.uaa.mfa;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -20,7 +35,6 @@
import java.util.Map;
import java.util.Set;
-import static org.cloudfoundry.identity.uaa.util.JsonUtils.getNodeAsBoolean;
import static org.cloudfoundry.identity.uaa.util.JsonUtils.getNodeAsDate;
import static org.cloudfoundry.identity.uaa.util.JsonUtils.getNodeAsString;
@@ -32,17 +46,13 @@
public static final String FIELD_IDENTITY_ZONE_ID = "identityZoneId";
public static final String FIELD_TYPE = "type";
public static final String FIELD_NAME = "name";
- public static final String FIELD_ACTIVE = "active";
public static final String FIELD_CREATED = "created";
public static final String FIELD_LAST_MODIFIED = "last_modified";
public static final String FIELD_ID = "id";
-
-
private String id;
private String name;
private String identityZoneId;
- private boolean active = true;
private AbstractMfaProviderConfig config;
@@ -51,7 +61,6 @@
@JsonProperty("last_modified")
private Date lastModified;
-
public Date getCreated() {
return created;
}
@@ -126,15 +135,6 @@ public String getId() {
return this;
}
- public Boolean isActive() {
- return active;
- }
-
- public MfaProvider setActive(boolean active) {
- this.active = active;
- return this;
- }
-
public String getName() {
return name;
}
@@ -153,6 +153,24 @@ public MfaProviderType getType() {
return this;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof MfaProvider)) return false;
+
+ MfaProvider<?> that = (MfaProvider<?>) o;
+
+ if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
+ return getIdentityZoneId() != null ? getIdentityZoneId().equals(that.getIdentityZoneId()) : that.getIdentityZoneId() == null;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = getName() != null ? getName().hashCode() : 0;
+ result = 31 * result + (getIdentityZoneId() != null ? getIdentityZoneId().hashCode() : 0);
+ return result;
+ }
+
public static class MfaProviderDeserializer extends JsonDeserializer<MfaProvider> {
@Override
@@ -184,7 +202,6 @@ public MfaProvider deserialize(JsonParser p, DeserializationContext ctxt) throws
result.setType(type);
result.setName(getNodeAsString(node, FIELD_NAME, null));
result.setId(getNodeAsString(node, FIELD_ID, null));
- result.setActive(getNodeAsBoolean(node, FIELD_ACTIVE, true));
result.setIdentityZoneId(getNodeAsString(node, FIELD_IDENTITY_ZONE_ID, null));
result.setCreated(getNodeAsDate(node, FIELD_CREATED));
result.setLastModified(getNodeAsDate(node, FIELD_LAST_MODIFIED));
@@ -0,0 +1,107 @@
+/*
+ * ****************************************************************************
+ * Cloud Foundry
+ * Copyright (c) [2009-2017] Pivotal Software, Inc. All Rights Reserved.
+ *
+ * This product is licensed to you under the Apache License, Version 2.0 (the "License").
+ * You may not use this product except in compliance with the License.
+ *
+ * This product includes a number of subcomponents with
+ * separate copyright notices and license terms. Your use of these
+ * subcomponents is subject to the terms and conditions of the
+ * subcomponent's license, as noted in the LICENSE file.
+ * ****************************************************************************
+ */
+
+package org.cloudfoundry.identity.uaa.mfa;
+
+import java.util.List;
+
+public class UserGoogleMfaCredentials {
+ private String userId;
+ private String secretKey;
+ private List<Integer> scratchCodes;
+ private int validationCode;
+ private String mfaProviderId;
+ private String ZoneId;
+
+
+ public UserGoogleMfaCredentials(String userId, String secretKey, int validationCode, List<Integer> scratchCodes) {
+ this.userId = userId;
+ this.secretKey = secretKey;
+ this.scratchCodes = scratchCodes;
+ this.validationCode = validationCode;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public List<Integer> getScratchCodes() {
+ return scratchCodes;
+ }
+
+ public void setScratchCodes(List<Integer> scratchCodes) {
+ this.scratchCodes = scratchCodes;
+ }
+
+ public int getValidationCode() {
+ return validationCode;
+ }
+
+ public void setValidationCode(int validationCode) {
+ this.validationCode = validationCode;
+ }
+
+ public String getMfaProviderId() {
+ return mfaProviderId;
+ }
+
+ public String getZoneId() {
+ return ZoneId;
+ }
+
+ public UserGoogleMfaCredentials setZoneId(String zoneId) {
+ ZoneId = zoneId;
+ return this;
+ }
+
+ public UserGoogleMfaCredentials setMfaProviderId(String mfaProviderId) {
+ this.mfaProviderId = mfaProviderId;
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserGoogleMfaCredentials that = (UserGoogleMfaCredentials) o;
+
+ if (validationCode != that.validationCode) return false;
+ if (!userId.equals(that.userId)) return false;
+ if (!secretKey.equals(that.secretKey)) return false;
+ return scratchCodes.equals(that.scratchCodes);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = userId.hashCode();
+ result = 31 * result + secretKey.hashCode();
+ result = 31 * result + scratchCodes.hashCode();
+ result = 31 * result + validationCode;
+ return result;
+ }
+}
@@ -1,43 +0,0 @@
-package org.cloudfoundry.identity.uaa.mfa_provider;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public abstract class AbstractMfaProviderConfig<T extends AbstractMfaProviderConfig<T>> {
- private String issuer;
-
- public static Class<? extends AbstractMfaProviderConfig> concreteMfaProviderConfigClass(MfaProvider.MfaProviderType type) {
- if(type == MfaProvider.MfaProviderType.GOOGLE_AUTHENTICATOR) {
- return GoogleMfaProviderConfig.class;
- }
- throw new IllegalArgumentException("Unknown MfaProvider.MfaProviderType: " + type);
- }
-
- public abstract void validate();
-
- public String getIssuer() {
- return issuer;
- }
-
- public T setIssuer(String issuer) {
- this.issuer = issuer;
- return (T) this;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- AbstractMfaProviderConfig<?> that = (AbstractMfaProviderConfig<?>) o;
-
- return issuer != null ? issuer.equals(that.issuer) : that.issuer == null;
- }
-
- @Override
- public int hashCode() {
- return issuer != null ? issuer.hashCode() : 0;
- }
-}
@@ -1,8 +0,0 @@
-package org.cloudfoundry.identity.uaa.mfa_provider;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-
-import java.io.IOException;
@@ -45,6 +45,7 @@
private boolean skipSslValidation = false;
private Map<String, Object> attributeMappings = new HashMap<>();
private boolean enableIdpInitiatedSso = false;
+ private Map<String, Object> staticCustomAttributes = new HashMap<>();
public SamlServiceProviderDefinition clone() {
@@ -185,6 +186,14 @@ public void setEnableIdpInitiatedSso(boolean enableIdpInitiatedSso) {
this.enableIdpInitiatedSso = enableIdpInitiatedSso;
}
+ public Map<String, Object> getStaticCustomAttributes() {
+ return staticCustomAttributes;
+ }
+
+ public void setStaticCustomAttributes(Map<String, Object> staticCustomAttributes) {
+ this.staticCustomAttributes = staticCustomAttributes;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
Oops, something went wrong.

0 comments on commit 391163e

Please sign in to comment.