Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Changing security settings while running
May 17, 2013
13:15, EEST
Avatar
TimK
Member
Members
Forum Posts: 41
Member Since:
June 27, 2012
sp_UserOfflineSmall Offline

I’m working on changing security settings right now, and it looks like updating them after the server has started doesn’t work. I can change the authentication type and see the change take effect immediately, but if I call setSecurityModes() to change the security policies or message security modes, the changes don’t happen unless I completely shut the server down. Even calling shutdown() and start() doesn’t seem to pick up the changes. Is this something that should work?

When changing the authentication mode I’m seeing an exception. I set UAExpert and the server up to connect with anonymous authentication, and connected successfully. Then I changed the authentication mode on the server to Password, and tried to reconnect with UAExpert. I get the exception below when that happens. If I close and reopen UAExpert, it then realizes I need a password and works correctly.

2013-05-17 08:48:05,805[Blocking-Work-Executor-17] ERROR – While handling ActivateSessionRequest (id=1837502933)
UserTokenSignature=SignatureData (id=2096951071)
Signature=null
Algorithm=null
LocaleIds=class java.lang.String[1]
[0]=en
ClientSoftwareCertificates=class org.opcfoundation.ua.core.SignedSoftwareCertificate[0]
ClientSignature=SignatureData (id=1102519380)
Signature=null
Algorithm=null
UserIdentityToken=ExtensionObject (id=1554313344)
encodeType=EncodeType (id=463011245)
ordinal=0
name=Binary
object=byte[] (id=1353290500)
typeId=NodeId (id=754128123)
value=UnsignedInteger (id=2068093725)
value=324
type=IdType (id=1291261514)
ordinal=0
name=Numeric
namespaceIndex=0
hash=1142157539
RequestHeader=RequestHeader (id=182878667)
AuditEntryId=null
AuthenticationToken=NodeId (id=592657412)
value=UnsignedInteger (id=763968698)
value=4
type=IdType (id=1291261514)
namespaceIndex=0
RequestHandle=UnsignedInteger (id=217181873)
value=8
Timestamp=DateTime (id=1601023258)
value=130132684858030545
AdditionalHeader=null
ReturnDiagnostics=UnsignedInteger (id=1936026766)
value=0
TimeoutHint=UnsignedInteger (id=427800296)
value=10000

ServiceFault: Bad_InternalError (0x80020000) “An internal error occurred as a result of a programming or configuration error.”
Diagnostic Info: java.lang.NullPointerException
at com.prosysopc.ua.UserIdentity.decryptPassword(Unknown Source)
at com.prosysopc.ua.server.SessionManager$ServerUserIdentity.(Unknown Source)
at com.prosysopc.ua.server.SessionManager.activateSession(Unknown Source)
at com.prosysopc.ua.server.SessionServiceHandler.onActivateSession(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.opcfoundation.ua.application.ServiceHandlerComposition$1.serve(Unknown Source)
at org.opcfoundation.ua.application.ServiceHandlerComposition.serve(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection$UATcpServerSecureChannel.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpConnection$3.onMessageComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.fireComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.setMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

at org.opcfoundation.ua.application.ServiceHandlerComposition$1.serve(Unknown Source)
at org.opcfoundation.ua.application.ServiceHandlerComposition.serve(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection$UATcpServerSecureChannel.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpConnection$3.onMessageComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.fireComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.setMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at com.prosysopc.ua.UserIdentity.decryptPassword(Unknown Source)
at com.prosysopc.ua.server.SessionManager$ServerUserIdentity.(Unknown Source)
at com.prosysopc.ua.server.SessionManager.activateSession(Unknown Source)
at com.prosysopc.ua.server.SessionServiceHandler.onActivateSession(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
… 11 more
2013-05-17 08:48:05,810 [Blocking-Work-Executor-16] INFO – Session closed:
2013-05-17 08:48:05,810 [Selector] INFO – AsyncSocketInputStream.close(): unexpected untriggered monitor
2013-05-17 08:48:05,811 [Selector] INFO – Secure Channel closed, token=SecurityToken(Id=1, secureChannelId=2, creationTime=May 17, 2013 8:48:05 AM, lifetime=3600000)
2013-05-17 08:48:05,811 [Selector] INFO – Channel closed: Id=2, open channels=0

May 20, 2013
6:35, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 846
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

No, the server has not been designed to support changing the modes while running. I also expect that UaExpert probably does not always recheck the supported modes, so it may use “old settings” when connecting. This will probably explain the error.

I suppose you have a valid use case for this, so we should probably take a look what it takes to enable this kind of behavior in the SDK. shutdown/start has not been supported officially either, but we have had some requests, so it is getting slowly better as well.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 100

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 37

Rainer Versteeg: 32

Thomas Reuther: 26

Member Stats:

Guest Posters: 0

Members: 1058

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 981

Posts: 4145

Newest Members:

mats989, Sebastien Petitrenaud, sting2005, Ron Hoppe, Seb, p.devito, g.ilengo, MohamedLazrek, brittr83165991, martintinsley9

Moderators: Jouni Aro: 846, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 523, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 18, Matti Siponen: 31, Lusetti: 0

Administrators: admin: 0