Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keycloak as oauth2 provider #9168

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

amend07
Copy link

@amend07 amend07 commented Jun 4, 2024

OAuth2 Keycloak Integration for Apache CloudStack

This project provides an integration between Keycloak, an open-source Identity and Access Management solution, and Apache CloudStack, a popular open-source cloud computing software.

Features
OAuth2 Authentication: Seamlessly authenticate CloudStack users via Keycloak.
Single Sign-On (SSO): Leverage Keycloak's SSO capabilities for a unified login experience across multiple services.
User Management: Centralize user management with Keycloak, simplifying administration and enhancing security.
Customizable Configuration: Easily configure Keycloak settings within CloudStack to fit your specific environment and needs.
Prerequisites

  • Apache CloudStack 4.15 or later
  • Keycloak 24 or later
  • Java 8 or later

Configure Keycloak:

Set up a new client in Keycloak for CloudStack.
Configure roles, users, and mappings as required.
Configure CloudStack:

Update the CloudStack configuration to use Keycloak for authentication.
Restart CloudStack management server if necessary.

Contributing
We welcome contributions to enhance this integration. Please fork the repository, create a feature branch, and submit a pull request.

Copy link

boring-cyborg bot commented Jun 4, 2024

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@@ -0,0 +1,98 @@
package org.apache.cloudstack.oauth2.keycloak;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amend07 can you please add license?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package org.apache.cloudstack.oauth2.keycloak;
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.oauth2.keycloak;

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great to see the changes for the integration of keycloak @amend07, thank you.

I'll test this once. Do you have plans to extend this support in UI also ?

@amend07
Copy link
Author

amend07 commented Jun 17, 2024

@harikrishna-patnala I am waiting for your response.

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.19%. Comparing base (a9caee3) to head (9e53596).
Report is 28 commits behind head on main.

Current head 9e53596 differs from pull request most recent head 0d3489e

Please upload reports for the commit 0d3489e to get more accurate results.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #9168       +/-   ##
============================================
- Coverage     15.32%   4.19%   -11.14%     
============================================
  Files          5459     369     -5090     
  Lines        477298   30277   -447021     
  Branches      60202    5357    -54845     
============================================
- Hits          73135    1269    -71866     
+ Misses       396084   28864   -367220     
+ Partials       8079     144     -7935     
Flag Coverage Δ
uitests 4.19% <ø> (ø)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@harikrishna-patnala
Copy link
Contributor

@harikrishna-patnala I am waiting for your response.

Do you have plans to extend this support in UI also ?

@amend07
Copy link
Author

amend07 commented Jun 18, 2024

of course I will. why don't we add as an option with google and github dropdown list.

@harikrishna-patnala
Copy link
Contributor

@amend07 there are build failures, can you please check and update the PR

@harikrishna-patnala
Copy link
Contributor

of course I will. why don't we add as an option with google and github dropdown list.

yes we can do that

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@amend07
Copy link
Author

amend07 commented Jun 27, 2024

@harikrishna-patnala check it out now.

@amend07
Copy link
Author

amend07 commented Jul 12, 2024

@harikrishna-patnala I'm waiting your response

@shwstppr
Copy link
Contributor

@amend07 there are merge conflicts in the PR. Can you please resolve them?

@rohityadavcloud
Copy link
Member

@amend07 there are merge conflicts in the PR. Can you please resolve them and also address any outstanding comments?

@JoaoJandre JoaoJandre removed this from the 4.20.0.0 milestone Sep 10, 2024
@JoaoJandre JoaoJandre added this to the 4.21.0.0 milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants