diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2e9dc4f..b8fadb1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,8 +7,8 @@
-
-
+
+
@@ -39,6 +39,7 @@
+<<<<<<< Updated upstream
{
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "git-widget-placeholder": "main",
+ "last_opened_file_path": "C:/xampp/htdocs/java-wpd-auth/WPD-Auth-PR/WPD-Auth",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "reference.settings.project.maven.repository.indices"
+>>>>>>> Stashed changes
}
-}]]>
+}
diff --git a/pom.xml b/pom.xml
index 650e0eb..f2e70f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,6 +17,11 @@
16
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
org.springframework.boot
spring-boot-starter-data-jpa
diff --git a/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java b/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java
index cd85634..08abe4e 100644
--- a/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java
+++ b/src/main/java/org/waterproofingdata/wpdauth/security/WebSecurityConfig.java
@@ -33,13 +33,16 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
// Entry points
http.authorizeRequests()//
- .antMatchers("/users/login").permitAll()//
- .antMatchers("/users/signup").permitAll()//
- .antMatchers("/users/existsByUsername").permitAll()//
+ .antMatchers("/actuator/**").hasRole("ADMIN") //
+ .antMatchers("/users/login").permitAll()//
+ .antMatchers("/users/signup").permitAll()//
+ .antMatchers("/users/existsByUsername").permitAll()//
.antMatchers("/users/existsByNickname").permitAll()//
.antMatchers("/forgotpasswords/findallforgotpasswordquestions").permitAll()//
.antMatchers("/forgotpasswords/loginbyusernameandanswers").permitAll()//
- .antMatchers("/h2-console/**/**").permitAll()
+ .antMatchers("/forgotpasswords/findallforgotpasswordquestions").permitAll() //
+ .antMatchers("/forgotpasswords/loginbyusernameandanswers").permitAll() //
+ .antMatchers("/forgotpasswords/loginbyusernameandanswers").permitAll()//
// Disallow everything else..
.anyRequest().authenticated();
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index ed55c87..fdc9d6e 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -27,3 +27,20 @@ UsersController.signup=Creates user and returns its JWT token.
UsersController.delete=Deletes specific user by username.
UsersController.search=Returns specific user by username.
UsersController.me=Returns current user's data.
+
+# actuator
+management.endpoint.health.show-details=always
+#indica que health deve mostrar detalhes sempre
+
+management.endpoints.web.exposure.include=*
+#alem do health e do info ele sempre vai export todos endpoints disponiveis
+
+info.app.name=@project.name@
+info.app.description=@project.description@
+info.app.version=@project.version@
+info.app.encoding=@project.build.sourceEncoding@
+info.app.java.version=@java.version@
+# puxa informacoes do projeto do pom.xml
+
+spring.boot.admin.client.url=http://localhost:8080
+# configurando o Spring Boot Admin Server
\ No newline at end of file