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

Migrate old objects values to the OIDC class #41 #50

Merged
merged 13 commits into from
Dec 16, 2024

Conversation

ChiuchiuSorin
Copy link
Contributor

Created a new configuration for OIDC properties, set default values specific to Azure for the new configuration. Created a java configuration for the old configuration for the old Identity OAuth classes and a listener that copies the old configuration to the new OIDC configuration.

* modified parent  platform version to 14.10-1
* uploaded the documents from an instance of XWiki 14.10
* updated README.md
* checked for keywords and regex
* tested functionalities using Identity OAuth (pro)
# Conflicts:
#	pom.xml
* Created a new configuration for OIDC properties
* Set default values specific to Azure for the new configuration
* Created a java configuration for the old configuration for the old Identity OAuth classes
* Created a listener that copies the old configuration to the newly OIDC configuration
@ChiuchiuSorin ChiuchiuSorin self-assigned this Oct 31, 2024
@ChiuchiuSorin ChiuchiuSorin linked an issue Oct 31, 2024 that may be closed by this pull request
@ChiuchiuSorin ChiuchiuSorin marked this pull request as ready for review November 15, 2024 16:31
@ChiuchiuSorin ChiuchiuSorin requested review from oanalavinia and removed request for oanalavinia November 18, 2024 09:58
* replaced DocumentUpdatedEvent with XObjectUpdatedEvent
* removed TODO
* renamed AzureAD to Entra ID
* refactored the initializer
* added unit tests
* code refactoring
Copy link
Contributor

@oanalavinia oanalavinia left a comment

Choose a reason for hiding this comment

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

Answers + some mentions about AzureAD -> EntraID

<hidden>true</hidden>
<content/>
<object>
<name>AzureAD.AzureADClientConfiguration</name>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also use EntraID

Even for the space. I know there is already a AzureAD space, but are any of the pages we have in it, gonna be used in 2.x, after all changes are done? Do we want to keep it for the WebPreferences, is it necessary? I feel like we will keep this space only for migration purposes and it's ok to have all new pages in a separated space (AzureAD is about old stuff / 1.x, EntraID is about 2.x). Let me know if I am missing something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I also modify the naming convention of the java source folders from com.xwiki.azureoauth to com.xwiki.entraid?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since all (2) classes from the current package will be removed, yes, you can rename it too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, but I'd leave the renaming for after I actually remove the classes, in #48.

* renamed new documents and classes to Entra ID name convention
* replaced the configuration initialization from only at version 2.0 to whenever the configuration is empty
Copy link
Contributor

@oanalavinia oanalavinia left a comment

Choose a reason for hiding this comment

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

Let me know if I missed some questions :)

These are mainly only some renames

<hidden>true</hidden>
<content/>
<object>
<name>AzureAD.AzureADClientConfiguration</name>
Copy link
Contributor

Choose a reason for hiding this comment

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

Since all (2) classes from the current package will be removed, yes, you can rename it too

Comment on lines +751 to +754
<userNameFormatter>${oidc.idtoken.upn._clean._lowerCase}</userNameFormatter>
</property>
<property>
<userSubjectFormatter>${oidc.idtoken.oid}</userSubjectFormatter>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a note for later, we should mention these in the documentation after 2.0 is released :)

* name refactoring
* added and modified comments
@oanalavinia
Copy link
Contributor

Don't forget to merge it in a 2.x branch :) (just noticed that the merge request is for the master branch). Thanks!

@ChiuchiuSorin ChiuchiuSorin changed the base branch from master to 2.x December 16, 2024 13:40
@ChiuchiuSorin ChiuchiuSorin merged commit 3d44684 into xwikisas:2.x Dec 16, 2024
@ChiuchiuSorin ChiuchiuSorin deleted the iss41 branch December 16, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate old objects values to the OIDC class
2 participants