artur,
Where does the additional metadata come from?
That script looks very basic. You could put a timer around each statement in
the script to see which one(s) takes a long time.
Ray
On Tue, 2023-12-12 at 02:19 -0800, artur miś wrote:
Notice: This message was sent from outside the University of Victoria email
system. Please be cautious with links and sensitive information.
Buddys i atached some more information :
I have got problem with long execution time of basic groovy script:
cas.authn.attribute-repository.groovy[0].location=file:/etc/cas/config/custom-attr.groovy
import java.util.*
import java.text.SimpleDateFormat
import groovy.transform.Field
import javax.naming.directory.*
import java.util.Hashtable
import javax.naming.*
@Field File file = new File("/etc/cas/config/groovy_logs.txt")
def run(final Object... args) {
def (username,attributes,logger,properties,appContext) = args
logger.debug("[{}]: The received uid is [{}]", this.class.simpleName, username)
file.append "\n login: "+args[0]+" cas-id:"+args[1]['principal']+"\n"
file.append "\n version groove: "+GroovySystem.version+"\n"
// All attribute values must be defined as a collection wrapped in []
return [username:[username], likes:["6cheese", "7food"], id:[1234,2,3,4,5],
another:["attribute"] ]
println GroovySystem.version
}
System CAS:
CAS Version: 7.0.0-RC9
CAS Branch: master
CAS Commit Id: xxxxxxxxxxx
CAS Build Date/Time: 2023-11-25T07:12:15.881468Z
Spring Boot Version: 3.2.0
Spring Version: 6.1.0
Java Home: /usr/lib/jvm/zulu21-ca-amd64
Java Vendor: Azul Systems, Inc.
Java Version: 21.0.1
Servlet Version: 6.0.0
JVM Free Memory: 345 MB
JVM Maximum Memory: 4 GB
JVM Total Memory: 512 MB
OS Architecture: amd64
OS Name: Linux
OS Version: 5.4.0-167-generic
OS Date/Time: 2023-12-12T10:35:50.786113719
OS Temp Directory: /tmp
Logs:
2023-12-12 10:41:41,731 DEBUG
[org.apereo.cas.authentication.attribute.PrincipalAttributeRepositoryFetcher] -
<Fetching person attributes for query [{principal=xxxxxx data xxxxxxx}]>
no activity in the log (just waiting )
2023-12-12 10:41:55,497 DEBUG
[org.apereo.cas.authentication.principal.resolvers.InternalGroovyScriptDao] -
<[custom-attr]: The received uid is [christmas_banny]>
2023-12-12 10:41:55,497 DEBUG
[org.apereo.cas.authentication.principal.resolvers.InternalGroovyScriptDao] -
<Groovy-based attributes found are [{username=[christmas_banny],
likes=[6cheese, 7food], id=[1234, 2, 3, 4, 5], another=[attribute]}]>
This problem has ocured only when we atached groovy without groovy
authentication work smoth. Groovy is slow or wait but after let say 15sek
returned additional metadata.What is the problem or where find out solution ?
środa, 6 grudnia 2023 o 17:02:45 UTC+1 artur miś napisał(a):
Hello,
Have you noticed that groovy 4.0.15 is slow ? I have hached to 4.0.16 and the
same .
Regards
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/22b00fbc07a6be876b5eab267bafec72ba63c6f3.camel%40uvic.ca.