Skip to content

Conversation

@matrei
Copy link
Contributor

@matrei matrei commented Feb 24, 2025

This PR merges the following Grails Spring Security Plugins into this repository:

  • ACL
  • CAS
  • LDAP
  • Oauth2
  • Rest
  • UI

jdaugherty and others added 30 commits October 15, 2024 13:16
…s-jose-jwt-9.x

Update dependency com.nimbusds:nimbus-jose-jwt to v9.41.2
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.16.0 to 1.16.1.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-codec@rel/commons-codec-1.16.0...rel/commons-codec-1.16.1)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.16.0 to 1.16.1.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-codec@rel/commons-codec-1.16.0...rel/commons-codec-1.16.1)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.11 to 1.14.19.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](raphw/byte-buddy@byte-buddy-1.14.11...byte-buddy-1.14.19)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…mons-codec-commons-codec-1.16.1

Bump commons-codec:commons-codec from 1.16.0 to 1.16.1
Update dependency com.google.guava:guava to v33.3.1-jre
…mons-codec-commons-codec-1.16.1

Bump commons-codec:commons-codec from 1.16.0 to 1.16.1
….bytebuddy-byte-buddy-1.14.19

Bump net.bytebuddy:byte-buddy from 1.14.11 to 1.14.19
…ons-codec-1.x

Update dependency commons-codec:commons-codec to v1.17.1
@matrei matrei requested a review from jdaugherty February 24, 2025 17:08
Removed PDF and EPUB from `acl` and `cas` for now.
Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

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

My main concerns are:

  1. the doc publishing, i think only core is publishing
  2. the nested readme files need updated to remove their badges and links to refer to the new repo

I pointed out some out dated code in the docs, but we can ticket to fix that later if you want.

If I can help with the doc publishing, please let me know. I'm happy to make those changes to expedite this.

@@ -0,0 +1,201 @@
Apache License
Copy link
Contributor

Choose a reason for hiding this comment

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

Only the license file at the root of the project needs to remain; this can be removed.

@@ -0,0 +1,201 @@
Apache License
Copy link
Contributor

Choose a reason for hiding this comment

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

Only the license file at the root of the project needs to remain; this can be removed.

@@ -0,0 +1,201 @@
Apache License
Copy link
Contributor

Choose a reason for hiding this comment

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

Only the license file at the root of the project needs to remain; this can be removed.

@@ -0,0 +1,201 @@
Apache License
Copy link
Contributor

Choose a reason for hiding this comment

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

Only the license file at the root of the project needs to remain; this can be removed.

commonsLangVersion=2.6
dumbsterVersion=1.6
grailsRedisVersion=5.0.0-M1
hibernateVersion=5.6.15.Final
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this is being used under acl-examples-functional-test-app, but the gorm-hibernate5 should already be including this library. Why are we including it separately and having to maintain the hibernate version separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • acl-examples-functional-test-app is using org.hibernate.ObjectNotFoundException
  • ui-examples-extended and ui-examples-simple are using org.hibernate.SessionFactory

This makes org.hibernate:hibernate-core-jakarta a direct dependency of these projects, so it should be declared as such. If we add the version to grails-bom (hibernate5.version?) or when we move to Hibernate 6 (hibernate.version is available in spring-boot-dependencies) we can omit this.

Copy link
Contributor

Choose a reason for hiding this comment

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

What are your thoughts on exposing hibernate5 as an API as part of gorm-hibernate5?

ObjectNotFoundException is directly thrown by DomainClass.get(id) - if you want performant applications, you'll have to add @GrailsCompileStatic which means any place someone uses a get() method, they will be forced to add this gradle library. I suspect that means pretty much everywhere for any real world use of hibernate.

Again, if type checking is enabled, the Hibernate Session class will be the argument to helpers like withNewSession { }.

I'd normally agree you have to manually expose these, but with the hibernate5 not being able to be put in the bom, the gorm implementation acting as a wrapper around hibernate, and the compatibility issues between 5 & 6, it seems worth to expose as an API dependency.

Copy link
Contributor

@jdaugherty jdaugherty Feb 26, 2025

Choose a reason for hiding this comment

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

Wait, looking closer at the gorm-hibernate5 project:

     api "org.hibernate:hibernate-core-jakarta:$hibernateVersion", {

It's already added as an api. We shouldn't be overriding it since that's a maintenance burden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it adds a minimal maintenance burden (in this case I think the burden is actually zero as I don't think the version will change), but declaring your direct dependencies is a best practice that also brings stability and clarity.

If you still oppose this I will remove the dependency declaration, as these are only example/test apps, but for libraries I think we should be more rigid as not adhering to this has been a source problems and confusion historically (at least for me).

Copy link
Contributor

Choose a reason for hiding this comment

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

I 100% agree we should be declaring direct dependencies for our libraries / internal projects to grails-core. We should be as detailed as possible in our gradle projects given the scope.

With that said, I want to be careful about having end grails apps do so. These are examples, so they are end apps in my mind. I disagree with adding extra dependencies here. Developers are going to use this as an example and I view gorm-hibernate5 as an extension of hibernate5, not an addition. We want our examples to represent end user apps and we don't want the user to have to redefine these. There's the added benefit that it's less maintenance burden long term as we upgrade too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why there's a nested project under the docs, can this whole project be moved out to a test example and referenced? I'm going to stop making comments similar to this on everything in the code directory under docs

MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
run: ./gradlew --no-build-cache publish
- name: "🔨 Generate Snapshot Documentation"
run: ./gradlew core-docs:docs
Copy link
Contributor

Choose a reason for hiding this comment

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

This only publishes the core-docs. Do we intend to combine the docs together or leave separate and publish as subdirectories? My first reaction is to keep them separate.

@@ -0,0 +1,78 @@
Spring Security OAuth2 Plugin
=======
[![Java CI](https://github.com/grails/grails-spring-security-oauth2/actions/workflows/gradle.yml/badge.svg)](https://github.com/grails/grails-spring-security-oauth2/actions/workflows/gradle.yml)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the badges from this file since they won't be valid anymore?

```groovy
dependencies {
...
implementation 'org.grails.plugins:spring-security-core:5.2.1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move the installation instructions to the docs so the versions can be updated as part of the build process?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll defer updating the README files to another PR.

'icons' : 'font',
'version' : project.version,
'sourcedir' : "${rootProject.allprojects.find { it.name == 'spring-security-rest' }.projectDir}/src/main/groovy",
'baseGroovyApiUrl': "https://grails-plugins.github.io/grails-spring-security-rest/${project.version}/docs/gapi/"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this link will be invalid now.

Only keep the LICENSE file in the root project directory.
These files are not used anymore as the projects are merged and only need one `ghpages.html` file.
For removing aggregated docs.
@matrei matrei marked this pull request as draft February 27, 2025 17:18
@matrei matrei marked this pull request as ready for review February 27, 2025 20:50
@@ -1,15 +1,14 @@
:includedir: src/docs/
= Spring Security CAS Plugin - Reference Documentation
Puneet Behl <behlp@unityfoundation.io>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this since we dont' typically put the original author or maintainers in the docs at the top?

@jamesfredley jamesfredley added this to the grails:7.0.0-M2 milestone Feb 27, 2025
@jamesfredley jamesfredley moved this to In Progress in Grails 7 Feb 27, 2025
@matrei matrei merged commit 270ccd4 into apache:7.0.x Feb 27, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Grails 7 Feb 27, 2025
@matrei matrei deleted the matrei/merge-security-repos branch February 27, 2025 22:14
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.

Merge 6 additional Spring Security projects into grails-spring-security-core

7 participants