Keycloak Admin Rest API in Spring Boot

preview_player
Показать описание
Learn how to manage a Keycloak realm with its roles and users using the admin rest API from your Spring Boot application.

References

-- Paid Gig --

-- Help Us Grow --

Help us build an online community where software engineering students and professionals can have discussions about the fundamentals and advanced concepts of programming, current tech trends & job opportunities, and the struggles & life wins of programmers.

--- Channel Support ---

I hope I was able to impart some knowledge that could be of help to your personal life or professional career. SUBSCRIBE to my channel and hit the bell icon to get updated when new videos are uploaded.

Want to help SUPPORT my channel? Thank you in advance!

----- About this Channel -----

I am Edward Legaspi, the content creator of Czetsuya Tech.

And I create Youtube Tutorials and Write Blog Articles that
- Teach beginner and advance concepts of programming and software engineering design and development.
- Share my life experiences as a remote programmer.
- Introduce remote-work as a source of income.

Topics included in my videos and blogs are:
- Software Engineering
- Databases
- DevOps
- Tips and Tricks on being a Programmer
- WordPress Website Development
- Remote Work Environment, Tools, & Stories

With your support, I'll be able to produce more, well-researched, and high-quality learning videos and blog posts. I would be most grateful for any support.

I believe that in sharing this knowledge we can empower a community of tech people who have the passion and vision to develop tech that will make this world a better place to live.

Thank you always for all your support!

- Website
- Facebook:
- Linkedin:
- Twitter:

--- Disclaimer ---

Keep in mind that I may receive commissions when you click on the links and make purchases, they will help support this channel. However, this does not impact the content of the videos. I'm trying my best to keep things base on my experience, fair and balanced, in order to help you make the best choice.

#czetsuyatech
Рекомендации по теме
Комментарии
Автор

HI, when i make login returns the token, but when i make get is not bringing anything, why?, i already set the realm and import the user json in keycloack

novenix
Автор

Hi, to make testing easier. I dockerized the application.

czetsuyatech
Автор

Hi friend, can you show an example with registratom form. For example using users registration form angular application and workflow.

mailtoharutyunyan
Автор

Hello Sir, We have built a rest project where we have used keycloak for authorization and authentication, but when the rest APIS are called from browser it shows CORS error ( no header present), i have already added web origin as * ( same show in the token received via postman call) , if vue application uses proxy it works fine but it get blocked in browser with out proxy, Could you please help, I will be grateful to you.

processor
Автор

Is it normal to create a new Keycloak instance for each request? If I were to define a spring bean that returns a Keycloak instance or a RealmResource instance just to access user details, what bean scope should I use?

dyluc
Автор

Hi ! do you have any idea on how i could do a rest controller that will extract a list of all realm users ? i am not sure which Keycloak objects / instances it needs in order to extract that info. would be very much appreciated. thank you

tcylia
Автор

Hi Sir, i changed the client access type to the bearer-only and user has been created. but when I try to take access token using postman, this error is come.
{
"error": "invalid_client",
"error_description": "Bearer-only not allowed"
}
if you don't mind, could you please tell me about what is the solution for this problem.

yasiruwickramanayake
Автор

I have created a user and assigned manage-user role to it. I am trying to create user using rest endpoint but I am keep getting 401 unauthorized error.

Could you please suggest what could be th e problem

processor
Автор

When I try to create the users in keycloak using sprint boot. I am getting the 401 exception. How to solve my issue

shaheedkhan
Автор

Hello Thanks for the tutorial

Can we also in this way add a ROLE to the user ?
if yes, can the authenticated user can and a specific ROLE to is own profile ?

jean-baptistedioli
Автор

Hi sir, can we use keycloak for permission based authorization with spring boot. That means can we use permissions instead of roles with @preauthorize annotation. If you don't mind, could you please explain this?

yasiruwickramanayake
Автор

HI @czetsuyatech
I successfully integrated keycloack with spring largely thanks to your tutorial. so thank you very much.
I have a problem on the other hand.
I added an add user feature but I have a problem. indeed if I leave ** super.configure (http); ** I have a spring error ** Forbidden *** and if I remove it I have a keycloack error **

"class java.lang.String cannot be cast to class (java.lang.String is in module java.base of loader 'bootstrap'; is in unnamed module of loader 'app')"

ANy idea how to solve this ?

aliouthiema
Автор

Hi czetsuyatech. Your video was very interesting. I saw that you implemented separately frontend and api-service. Why? Does it's a best practice or your simply choice?

tommasogalati
Автор

Hey can you show in a tutorial how do spring keyclaok and angular in prod mode?

siriusmarz
Автор

Why does your code compile? Where does the in your KeycloakAdminClientUtils.java come from? What kind of magic are you using?

mat-videos
Автор

Hi Sir,
Nice tutorial.
I want to create new user and it gives {
    "error": "unknown_error"
}

I user below service, for token


& for creating user


Please guide,

yogeshredmine
Автор

Hi Very Nice Tutorial.
can you share some thing where we can create user through java application. Or password of User can be updated

yogeshredmine
Автор

Very well explaination can I add custom login page for my spring boot app by providing keycloak security

gauravverma-xssl
Автор

Hi czetsuyatech, nice tutorial. i'm wondering if you help me with keycloak rest api with python flask or django Rest Api. thank you

raghu
Автор

How to create the users using spring boot with admin role

shaheedkhan
welcome to shbcf.ru