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

Epic/cognito/develop #186

Open
wants to merge 98 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
edc2be8
- Add cognito dependencies
sbearcsiro Sep 12, 2022
79b4138
Epic/cognito/user service refactor (#138)
yasima-csiro Nov 14, 2022
1ba6675
Add default AWS credentials support
sbearcsiro Nov 16, 2022
6a4cbf5
Merge pull request #139 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Nov 21, 2022
0d01468
Split main userdetails code into plugin (#142)
sbearcsiro Dec 13, 2022
d10ab46
Remove hibernate dependencies from cognito impl, remove previous prof…
sbearcsiro Dec 13, 2022
542166e
Epic/cognito/user service refactor&password reset (#140)
yasima-csiro Dec 14, 2022
71c355f
Add UI id to to UserRecord to work around no db id for non GORM Users
sbearcsiro Dec 14, 2022
1a62b43
Merge branch 'dev' into epic/cognito/develop
sbearcsiro Dec 15, 2022
72eaaa0
- Add generic PagedResult to replace GORM equivalent
sbearcsiro Dec 16, 2022
f9baf3c
- Use Cognito groups to implement Roles
sbearcsiro Dec 16, 2022
bc2ae1a
- Update GormUserService to use PagedResults
sbearcsiro Dec 16, 2022
160da42
Remove commented code
sbearcsiro Dec 16, 2022
b521af3
Update scopes for each application
sbearcsiro Dec 16, 2022
77cd798
Merge branch 'epic/cognito/develop' into epic/cognito/feature/roles-a…
sbearcsiro Dec 16, 2022
91361b9
Remove comments
sbearcsiro Dec 16, 2022
63aaf8f
Add user.id for non-GORM project
sbearcsiro Dec 19, 2022
425f611
Merge branch 'epic/cognito/develop' into epic/cognito/feature/gsp-use…
sbearcsiro Dec 19, 2022
e24e39a
remove uiId from UserRecord
sbearcsiro Dec 19, 2022
6743f56
Merge pull request #145 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Dec 19, 2022
814333a
Merge branch 'epic/cognito/develop' into epic/cognito/feature/roles-a…
yasima-csiro Dec 19, 2022
00f1f54
Merge pull request #144 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Dec 19, 2022
04aa4d8
Fixes for issues found during testing:
sbearcsiro Dec 22, 2022
df335cf
Cleanup @EqualsAndHashCode usage
sbearcsiro Dec 22, 2022
0e201df
- Add passwordOperations @Beans
sbearcsiro Dec 22, 2022
a66f5fc
Clean up dependencies
sbearcsiro Jan 11, 2023
05fd088
Refactor checkPassword from PasswordService to IPasswordOperations
sbearcsiro Jan 12, 2023
a66f958
Add feature flag for enabling confirm password on update
sbearcsiro Jan 12, 2023
4859195
Merge pull request #148 from AtlasOfLivingAustralia/epic/cognito/bugf…
yasima-csiro Jan 12, 2023
b6a9c1f
Userdetails web services refactoring (#143)
yasima-csiro Jan 13, 2023
527f32e
add newly registered users to the `user` group.
brucehyslop Jan 13, 2023
acb7f2c
Merge pull request #149 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Jan 15, 2023
b5cc468
Fix plugin build.gradle to be more plugin like
sbearcsiro Feb 1, 2023
f777aed
Address asset pipeline issue (#152)
yasima-csiro Feb 2, 2023
b23447e
- Create read only interfaces for core domain classes (#154)
sbearcsiro Feb 14, 2023
1b79cf4
Epic/cognito/ip whitelisting (#153)
yasima-csiro Feb 28, 2023
6ea8f32
Epic/cognito/cleanup 2 (#147)
yasima-csiro Mar 2, 2023
3369d47
Fix userdetails ws interceptor (#160)
sbearcsiro Mar 2, 2023
5d3ab79
Convert AuthorisedSystemRecord into IAuthorisedSystem (#162)
sbearcsiro Mar 6, 2023
3764e9b
Update openapi config to add custom server (#161)
yasima-csiro Mar 6, 2023
383b9d5
Fix delegated taglib output not being displayed
sbearcsiro Mar 7, 2023
5c729a5
Remove unused import
sbearcsiro Mar 7, 2023
d494230
Add transactional annotation to GORM methods
sbearcsiro Mar 7, 2023
85d1ef4
Fix saving password objects in unit test
sbearcsiro Mar 7, 2023
69a2352
Add additional admin update user method to allow admin controller to …
sbearcsiro Mar 8, 2023
8b36f6e
- Update ala plugins versions
sbearcsiro Mar 10, 2023
1459e39
Update CognitoUserService.groovy
yasima-csiro Mar 24, 2023
b705e81
Fix Property api issue
dewmini Jul 27, 2023
cd6d17a
Epic/cognito/feature/apikey (#163)
yasima-csiro Nov 3, 2023
90296a0
#175 Add mailing list CSV support
sbearcsiro Nov 3, 2023
374fefa
#174 Add cognito affiliation report support
sbearcsiro Nov 3, 2023
ff2b065
Merge pull request #176 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Nov 3, 2023
e13fba0
Fix issues
dewmini Nov 6, 2023
80989ed
Fix test cases
dewmini Nov 6, 2023
c7ada8f
Fix API issues
dewmini Nov 6, 2023
9a96ba7
Merge pull request #178 from AtlasOfLivingAustralia/epic/cognito/feat…
yasima-csiro Nov 8, 2023
457bf4d
Update build.gradle
yasima-csiro Nov 8, 2023
2d0b516
Update travis
dewmini Nov 8, 2023
554e719
Add javadoc for PatternUtils.unquotePattern to fix warnings
sbearcsiro Nov 9, 2023
b4cee1f
Fix issues
dewmini Nov 20, 2023
cf8b53e
Fix isEmailInUse check to check users from both cognito pool and CAS db.
dewmini Nov 27, 2023
adfed51
Update travis
dewmini Nov 28, 2023
42df06a
#180 use custom character data for symbols (without extra special cha…
brucehyslop Nov 29, 2023
860f838
Merge branch 'epic/cognito/develop' into epic/cognito/180-admin-reset…
brucehyslop Nov 29, 2023
f842565
fixed import conflict
brucehyslop Nov 29, 2023
9779529
Merge pull request #181 from AtlasOfLivingAustralia/epic/cognito/180-…
brucehyslop Nov 29, 2023
77cb0f9
Address review comments
dewmini Nov 30, 2023
04cf216
Merge pull request #179 from AtlasOfLivingAustralia/feature/fix_isEma…
yasima-csiro Nov 30, 2023
bea301a
Fix failing test cases
dewmini Dec 4, 2023
fc2451d
Fix failing test cases
dewmini Dec 4, 2023
73a8439
Update MFA
dewmini Dec 5, 2023
d5f83c6
Fix IP list search
dewmini Dec 8, 2023
f3c425d
Update username to email
dewmini Dec 18, 2023
18b42df
Merge pull request #183 from AtlasOfLivingAustralia/feature/fix_usern…
yasima-csiro Jan 7, 2024
ea4af01
Update openapi plugin and fix get property issue
dewmini Apr 17, 2024
509584e
Disable changing email in edit screen
dewmini May 1, 2024
164d7f1
Update travis
dewmini May 1, 2024
aea4148
Hide user activated field for cognito
dewmini May 8, 2024
2ec2275
Provide ability to update email with confirmation #188
dewmini May 10, 2024
18b9095
Address review comments - redirect to home page after logout #192
dewmini Jun 6, 2024
5f31014
Fix error when saving Update my details page #194
dewmini Jun 11, 2024
5e1e211
Merge remote-tracking branch 'origin/epic/cognito/develop' into featu…
dewmini Jun 12, 2024
4e4dd72
Set up temporary password for user when account is created by admin
dewmini Jun 14, 2024
e6e42f6
Provide ability to update email with confirmation in CAS version #188
dewmini Jun 19, 2024
eb94a52
Fix test cases
dewmini Jun 20, 2024
5154048
Fix #200
dewmini Jul 24, 2024
1bc1b11
Userdetails grails6 upgrade (#199)
yasima-csiro Jul 31, 2024
92c4d1c
Address review comments
dewmini Aug 5, 2024
884e5e9
Address code review comments
dewmini Aug 6, 2024
f74d626
Merge remote-tracking branch 'origin/epic/cognito/develop' into featu…
dewmini Aug 6, 2024
e27dc00
Address code review comments
dewmini Aug 8, 2024
7a7e1a2
Address code review comments
dewmini Aug 8, 2024
368820b
Address code review comments
dewmini Aug 9, 2024
b3dc965
Fix test cases
dewmini Aug 9, 2024
5bb5443
Merge pull request #192 from AtlasOfLivingAustralia/feature/update_email
yasima-csiro Sep 9, 2024
5ef3d3d
Set up new pac4j library and Java 17
yasima-csiro Nov 11, 2024
33e7e54
Update API token validation to match with new pac4j changes
yasima-csiro Dec 10, 2024
53a6db0
Merge pull request #212 from AtlasOfLivingAustralia/feature/new_pac4j…
yasima-csiro Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: groovy
jdk:
- openjdk11
- openjdk17
sudo: false
branches:
only:
Expand All @@ -10,6 +10,11 @@ branches:
- grails3
- experimental_jwt
- /^feature.*$/
- epic/cognito/userServiceRefactor&PasswordReset
- epic/cognito/develop
- epic/cognito/cleanup-2
- epic/cognito/fix-asset-pipeline-issue
- epic/cognito/openapi_fix
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -20,6 +25,10 @@ cache:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

install:
- 'travis_wait 30 ./gradlew clean'
- './gradlew assemble'

after_success:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && travis_retry ./gradlew publish'
env:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ userdetails

## Note

v2.0 of userdetails requires [ALA CAS 5](https://github.com/AtlasOfLivingAustralia/ala-cas-5)
v4.0 of userdetails requires [ALA CAS 5](https://github.com/AtlasOfLivingAustralia/ala-cas-5) v6.6+ or AWS Cognito

## About
The Atlas user management app (userdetails) manages profile information for users.
Expand All @@ -13,11 +13,15 @@ This application is the central repository for user information for Atlas system

Userdetails works hand in hand with [ALA CAS 5](https://github.com/AtlasOfLivingAustralia/ala-cas-5) and both share the same underlying database.

CAS manages the local authentication as well as third party auth provider integrtion.
CAS manages the local authentication as well as third party auth provider integration.


## General Information

### Builds

This project will build 3 artifacts, 2 concrete implementations of the user details app (userdetails-gorm for CAS and userdetails-cognito for AWS Cognito) and the userdetails-plugin that handles all commmon functions.

### Technologies
* Grails framework: 3.2.11
* JQuery
Expand Down
249 changes: 3 additions & 246 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,247 +1,4 @@
//import static org.springframework.boot.gradle.SpringBootPluginExtension.LayoutType.*

buildscript {
repositories {
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.6"
classpath "org.grails.plugins:hibernate5:7.3.0"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.4.6"
}
}

plugins {
id "com.gorylenko.gradle-git-properties" version "2.4.1"
}

version "3.1.0-SNAPSHOT"
group "au.org.ala"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin:"maven-publish"

sourceCompatibility = 1.11
targetCompatibility = 1.11

repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
}

configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}

//grails {
// plugins {
// compile project(':openapi-plugin')
// }
//}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:5.6.9.Final"
implementation "org.hibernate:hibernate-jcache"
runtimeOnly 'org.ehcache:ehcache'
implementation "org.grails.plugins:gsp"
profile "org.grails.profiles:web"
runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
// runtimeOnly "com.h2database:h2"
// runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.4.6"
testImplementation "io.micronaut:micronaut-inject-groovy"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.0.0"
testImplementation "org.seleniumhq.selenium:selenium-api:4.0.0"
testImplementation "org.seleniumhq.selenium:selenium-support:4.0.0"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.0.0"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:4.0.0"

// Groovy backwards compat
runtimeOnly 'org.codehaus.groovy:groovy-dateutil'

// Grails plugin dependencies

implementation "org.grails.plugins:ala-bootstrap3:4.1.0"
implementation "org.grails.plugins:ala-ws-plugin:3.1.1"
implementation "org.grails.plugins:ala-ws-security-plugin:4.1.1"
implementation "org.grails.plugins:ala-auth:5.1.1"
implementation "org.grails.plugins:ala-admin-plugin:2.3.0"

implementation 'dk.glasius:external-config:3.1.0'
implementation 'org.grails.plugins:http-builder-helper:1.1.0'
implementation "org.grails.plugins:csv:1.0.1"
implementation 'org.grails.plugins:mail:3.0.0'

implementation "org.grails.plugins:oauth:4.0.0"
// transitive oauth plugin deps used in code
implementation "com.github.scribejava:scribejava-core:4.0.0"
implementation "com.github.scribejava:scribejava-apis:4.0.0"

implementation "domurtag.plugins:grails-simple-captcha:1.0.0-grails3"
implementation "org.grails.plugins:export:2.0.0"
implementation 'org.grails.plugins:grails-markdown:3.0.0'

// regular JAR dependencies

implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'mysql:mysql-connector-java:8.0.29'
testRuntimeOnly "com.h2database:h2"
implementation 'com.google.guava:guava:21.0'
implementation 'org.apache.httpcomponents:httpcore:4.3.3'
implementation 'org.apache.httpcomponents:httpclient:4.3.3'
implementation 'org.apache.httpcomponents:httpmime:4.3.3'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'commons-io:commons-io:2.6'
implementation 'commons-beanutils:commons-beanutils:1.8.3'
implementation 'org.mindrot:jbcrypt:0.4'
implementation 'com.opencsv:opencsv:5.5.2'

implementation 'org.springframework.session:spring-session-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.grails.plugins:spring-session-helper:2.0.1'
implementation 'org.mongodb:mongodb-driver-sync:4.6.0' // versions mismatch as transitive deps for
implementation 'org.mongodb:mongodb-driver-core:4.6.0'
implementation 'org.mongodb:bson:4.6.0'

// implementation "com.auth0:java-jwt:3.18.2"
// implementation "com.auth0:jwks-rsa:0.20.0"

// Spring Security to secure actuator endpoints
// TODO Upgrade or decommission boot admin
// compile 'de.codecentric:spring-boot-admin-starter-client:2.6.2'
// compile 'org.springframework.boot:spring-boot-starter-security'
// compile 'org.springframework.security:spring-security-web'

implementation('org.webjars.bower:chosen:1.8.3')
implementation('org.webjars.bower:chosen-bootstrap:1.1.0') {
exclude module: 'jquery' // dependency from skin
exclude module: 'bootstrap' // dependency from skin
}

implementation 'org.passay:passay:1.6.0'

implementation('au.org.ala.plugins:openapi:1.1.0')

testImplementation('com.squareup.retrofit2:retrofit-mock:2.9.0')
}

springBoot {
buildInfo()
}

bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

bootWar {
launchScript()
classifier = 'exec'
}

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

tasks.withType(Test) {
useJUnitPlatform()
}

webdriverBinaries {
if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
chromedriver {
version = '2.45.0'
fallbackTo32Bit = true
}
geckodriver '0.30.0'
}
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
} else {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}


assets {
minifyJs = true
minifyCss = true
}

publishing {
repositories {
maven {
name 'Nexus'
url "https://nexus.ala.org.au/content/repositories/${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases' }"
credentials {
username = System.getenv('TRAVIS_DEPLOY_USERNAME')
password = System.getenv('TRAVIS_DEPLOY_PASSWORD')
}
}
}
publications {
mavenJar(MavenPublication) {
artifact bootWar
}
}
subprojects {
version=projectVersion
group="au.org.ala"
}
10 changes: 10 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repositories {
maven { url "https://nexus.ala.org.au/content/groups/public/" }
// mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}
dependencies {
implementation("com.bertramlabs.plugins:asset-pipeline-gradle:4.3.0")
implementation("org.grails:grails-gradle-plugin:6.2.0")
implementation("org.grails.plugins:hibernate5:8.1.0")
}
8 changes: 3 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
grailsVersion=5.2.1
grailsGradlePluginVersion=5.2.1
groovyVersion=3.0.11
gorm.version=7.3.2
projectVersion=4.0.0-SNAPSHOT

org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading