본문 바로가기

분류 전체보기102

Cipher을 통한 암호화 서비스를 개발하면서 양방향으로 암호화를 진행해야하는 정보들이 존재하여 Cipher로 작업한 부분을 남긴다. @Component public class CipherHelper { public static String alg = "7E6YRDQ59E9UTAM9M3G4OJU2RZTGF6K4"; private static final String key = "AES/CBC/PKCS5Padding"; private static final String iv = key.substring(0, 16); // 16byte public static String encrypt(String text) throws Exception { /** * Cipher : AES 및 다양한 암호화 알고리즘을 사용하여 데이터를 암호화하고 해.. 2024. 2. 21.
CSP - Content Security Policy를 통한 XSS 방어 XSS 방어 작업을 진행하면서 특정 URL이 제대로 막히지 않고 script를 실행하는 상황이 발생하여 수많은 삽질 끝에... CSP로 작업한 부분을 작성해둔다. 문제가 된 구문 http://localhost:80/[uri]?page=1&nyx99">vjmujrnir5t=1 XSS는 무엇인가? https://www.keycdn.com/blog/x-xss-protection X-XSS-Protection - Preventing Cross-Site Scripting Attacks - KeyCDN Learn how the X-XSS-Protection HTTP response header can help better protect your website's visitors against common cross.. 2024. 2. 20.
내가 찾아볼려고 찾은 정규식 사이트 Spring - @Valid와 함께 사용할때 추가로 사용할 정규식 모음 Email https://emailregex.com/index.html Email Address Regular Expression That 99.99% Works. Almost perfect email address regular expression. Just copy and paste for a language of your choice. Feel free to contribute! emailregex.com 2024. 1. 28.
Elastic Search - 동의어 사전 작업(URI 업데이트) elastic search는 동의어 사전을 개발자가 정의 할 수 있게 해준다. 이는 재기동 없이 명령어로 업데이트가 가능하다. 다만 이는 updateable : true의 상황에서 가능하다... template을 새로 한다는것은 결국 새로운 역인덱싱이다... 우선 몇가지를 확인해보자. 1. 현재 읽고 있는 shard의 setting GET /[shard_name]/_settings //shard_setting { "[shard_name]": { "settings": { "index": { "routing": { "allocation": { "include": { "_tier_preference": "data_content" } } }, "number_of_shards": "1", "provided_nam.. 2024. 1. 13.
2023 회고, 그리고 2024 2023의 제일 큰 부분은 역시 이직..이 아닐까? 2022에 퇴사를 하고 2023에 새로운 회사에 이직했다. 메인 프로젝트 하나에 서브로 둘을 담당하는 일정에 꽤 정신 없었지만 나름 재밌었던거 같다. 백엔드 코드에 조금 더 집중하는 한해가 될 줄 알았는데... 역시 현실의 의지만으로 되지는 않더라 팀내에서 어쩌다보니 서버를 제일 많이 다뤄본 사람이 되어있다.. (즐겁기도?) 메인으로 잡은 프로젝트에서 우선적으로 모든 작업들을 진행하였다. 서브 프로젝트들은 앞 작업을 진행하면서 작성한 문서와 함께 해당 프로젝트 팀원분들과 함께 진행했다. 팀원분들께서 제일 무서워 하신 서버 EC2와의 거리감을 무엇보다 좁혀야했던 상황이었기에 최대한 많은 문서, 작업을 진행하면서 격은 많은 이슈, 특이 사항들을 세세하게 문.. 2024. 1. 13.
Property 'spring.profiles.active' imported from location 'class path resource [application-dev.yml]' is invalid application.yml 설정시 application-dev.yml 파일 명으로 명시하는 방법 yml 파일안에 spring.profiles.를 설정하는 방법 둘중 하나만 하면 된다. No need to mention spring.profiles.active property if file name is application-dev.yml ( spring boot new version ) https://stackoverflow.com/questions/67935961/property-spring-profiles-active-imported-from-location-class-path-resource-a Property 'spring.profiles.active' imported from location .. 2023. 12. 24.