Skip to content

Commit

Permalink
ELK image
Browse files Browse the repository at this point in the history
  • Loading branch information
DucBaoUIT committed Nov 20, 2024
1 parent ce8f213 commit 56063f6
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 410 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Continuous Integration for User Service
name: Continuous Integration for Comment Service

on:
push:
branches:
- main
- ducbao

jobs:
testing:
Expand All @@ -26,24 +26,24 @@ jobs:
- name: Unit Tests
run: mvn -B test --file pom.xml

# sonar-cloud-scan:
# needs: testing
# uses: ./.github/workflows/SonarQube.yaml
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# sonar-cloud-scan:
# needs: testing
# uses: ./.github/workflows/SonarQube.yaml
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build-image:
needs: testing
uses: ./.github/workflows/build-image.yaml
secrets:
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# scan-image:
# needs: build-image
# uses: ./.github/workflows/scan-image.yaml
# scan-image:
# needs: build-image
# uses: ./.github/workflows/scan-image.yaml

# notify:
# needs: scan-image
# uses: ./.github/workflows/notifyCI.yaml
# secrets:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# notify:
# needs: scan-image
# uses: ./.github/workflows/notifyCI.yaml
# secrets:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ build/

### VS Code ###
.vscode/
#logback-*.xml
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ The backend of this streaming project exposes the following API endpoints:


"# UserService"
# UserService-NT548
33 changes: 0 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,39 +82,6 @@
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version> <!-- Hoặc phiên bản mới nhất -->
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId> <!-- Hoặc jjwt-gson nếu bạn dùng Gson -->
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>



<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>5.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>3.2.4</version>
</dependency>


<dependency>
<groupId>net.logstash.logback</groupId>
Expand Down
44 changes: 0 additions & 44 deletions resources.yaml

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions src/main/java/com/programming/userService/config/RedisConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -22,26 +21,25 @@ public class SecurityConfig {

@Bean
public SecurityFilterChain defaultFilterChain(HttpSecurity httpSecurity) throws Exception {
JwtRequestFilter jwtRequestFilter = new JwtRequestFilter();
return httpSecurity
.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(auth -> auth.requestMatchers("/user/register", "/user/error").permitAll()
// .requestMatchers("/listUser").permitAll()
.requestMatchers("/user/login2").permitAll()
.requestMatchers("/user/login3").permitAll()
.requestMatchers("/user/listUserbyId/**").permitAll()
.requestMatchers("/user/hello-world").permitAll()
.requestMatchers("/user/send-verification-email").permitAll()
.requestMatchers("/user/logout").permitAll()
.requestMatchers("/user/listUserbyUsername").permitAll()
.requestMatchers("/user/listUserbyId/**").permitAll()
.requestMatchers("/user/updateProfile/**").permitAll()
.requestMatchers("/user/changePassword/**").permitAll()
.requestMatchers("/user/listUser").permitAll()

.requestMatchers("/user/").authenticated()
.authorizeHttpRequests(auth -> auth.requestMatchers("/register", "/error").permitAll()
.requestMatchers("/listUser").permitAll()
.requestMatchers("/video/upload").permitAll()
.requestMatchers("/video/list").permitAll()
.requestMatchers("/file/upload").permitAll()
.requestMatchers("/file/list").permitAll()
.requestMatchers("/file/downloadZipFile").permitAll()
.requestMatchers("/comments/upload").permitAll()
.requestMatchers("/comments/**").permitAll()
.requestMatchers("/video/**").permitAll()
.requestMatchers("/login2").permitAll()
.requestMatchers("/listUserbyId/**").permitAll()
.requestMatchers("/updateProfile/**").permitAll()
.requestMatchers("/send-verification-email").permitAll()
.requestMatchers("/hello-world").permitAll()
.requestMatchers("/**").permitAll()
.anyRequest().authenticated())
.addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter.class)
.httpBasic(Customizer.withDefaults())
.formLogin(Customizer.withDefaults())
.build();
Expand Down
Loading

0 comments on commit 56063f6

Please sign in to comment.