当前位置:网站首页>Summary of the first change to open source middleware keycloak
Summary of the first change to open source middleware keycloak
2022-07-24 02:03:00 【51CTO】
Preface
- This year, 5 Join a company in January , Mainly responsible for devops Platform construction and development , In the previous platform , Connect with the company's unified user center , I chose keycloak Open source middleware as a Certification Center , All subsystems pass SSO Realize single point, etc , Some systems are also adapted OIDC Authentication
- In the interaction process of the original system , The single point implementation of some two systems is through keycloak SPI Realized by mechanism , Probably OIDC Some things are not handled well 【 I really don't understand the source code 】, Then it is simulated keycloak Original login to realize single point problem , Unified storage token
Source code
- keycloak The specified version is changed on the basis of the source code , Good news : At least the source code is still , The last update was almost fast 2 New year , It's really a sad story
- The moment you get the source code , In an instant , In any case, all kinds of compilation cannot pass , The project cannot be started , Various forums Baidu search source code
- QQ Search for keycloak Correlation group , There are only two , One of them is an advertising group :
- My heart was suddenly cold , In the future, we should choose middleware rather than those used less in China , Otherwise, if something goes wrong, I don't understand
- Next, the problem has to be solved , Only hard on your head , First, I have a general look keycloak What is each module doing , How about the code flow .

orgasm
- Baidu 、 Google search , Finally, the code passed the compilation , Find the corresponding startup class , Good configuration JDBC Compile and start
- Exciting things are coming :
mvn install -Pdistribution After executing this code , The existing test environment data table structure has been initialized , Yes , The test environment crashed directly - The climax continues : This is the end of calving , Read the test environment mysql,binlog The log is not open , It means that the data cannot be found , Do how? , What else can I do , Let's improve the testing environment first
- Through two days of struggle , I dare not sleep at noon , Finally, the test environment has been restored , That's right keycloak Further familiarity .
- The first thing is to back up the data that the test environment can run normally , Backup to two libraries at one time , It's really good to lose the data .
complete
- Through the stumble in front , That's right keycloak Have some understanding of , And then through idea Of debugger Step by step debugging , Determine the code flow , Finally determine the simulation transformation plan
- After the source code transformation is completed, there is another big project , Deploy the existing modified code to the test environment , The previous script cannot run , Then change the script step by step , There are several such scripts
- The next step is through k8s Start in the test environment , Then modify it in the business system keycloak Interface request address , The business system continues to be modified , Each business here is different, so I won't elaborate
- Final , Final , Through two weeks' efforts , It can be regarded as the completion of this function , Wait for the launch .

summary
- Speaking of source code transformation, many small partners may be more counseling , I started out as well , But the ignorant are fearless , Good mentality , All are Java Written , I'm afraid of something , I also learn English Java Of , ha-ha
- keycloak Many design patterns are used in the source code , So it is difficult to read and debug the code , There are many implementation classes for the same interface
- As far as possible, add notes that you can understand where you have debugged , Convenient for your next debugging , Or other developers read the code
- Because of ignorance , So in changing any details , The reason is to back up the data first , Such as a database 、 The configuration file 、 Code branches, etc , It is convenient to roll back quickly if something goes wrong
- On production, we should do a good job in the on-line process drill , Think as much as possible , Authentication middleware like this , Certainly many systems have dependencies , We should have more understanding and control of the business
- Through this transformation, they finally solved the problems they had fed back for a long time , The inner sense of achievement is bursting

in general , Just don't advise
To learn more , Work hard ....
边栏推荐
- How to solve the problem that the device video cannot be played due to the missing CGO playback callback parameters of easycvr platform?
- Ora-12899 error caused by nchar character
- STM32安装教程和J-link烧录驱动安装教程【第二天】
- 中小型医院基础网络解决方案
- jmeter+influxdb+grafana压测实时监控平台搭建
- The new red envelope cover platform can build the source code of the independent background of the sub station
- After five years of contact with nearly 100 bosses, as a headhunter, I found that the secret of promotion was only four words
- Computer room construction data
- Jar package used by jsonarray in main function provided by leetcode
- Hundred million financing events account for more than 30%. Where is the next stop for super automation? -- Manfu Technology
猜你喜欢

Notes - record a dynamic datasource please check the setting of primary problem solving

Exchange 2013 SSL certificate installation document

1000 okaleido tiger launched binance NFT, triggering a rush to buy

深入了解-微信开发者工具

Local empowerment learning

以科技传递温度,vivo守护生物多样性之美

Problèmes de localisation et de planification des itinéraires (Lingo, mise en œuvre de MATLAB)

Hundred million financing events account for more than 30%. Where is the next stop for super automation? -- Manfu Technology

Magazine feature: the metauniverse will reshape our lives, and we need to make sure it gets better

Yinshimei Invisalign oral scan referral method (export oral scan data + online consultation)
随机推荐
Database security and data integrity
Draw a two coordinate diagram with MATLAB (the simplest in the whole network)
ASP. Net core write a cache attribute tool
奔走相告,行情与量化页面功能优化!股票量化分析工具QTYX-V2.4.5
Chapter 9.2 program control of MATLAB
Is Huatai Securities safe to open an account? How to handle it
Jenkins multitâche construction simultanée
使用第三方账号登录
Design of hospital wireless network system
Try to run this command from the system terminal Make sure that you use the correct
Precautions for using XXL job
Location and path planning (lingo, matlab implementation)
浅谈领域驱动设计
Cinq ans de contact avec près d'une centaine de patrons, en tant que chasseur de têtes, j'a i découvert que le secret de la promotion n'est que quatre mots
Vantui, axiso, FAQs and usage:
Cmake Getting Started tutorial
What is restful
图解数组和链表详细对比,性能测试
[C language operation of linked list (initialization, establishment, length calculation, addition, deletion, and output of linked list)]
新红包封面平台可搭建分站独立后台的源码