SecurityPolicy configuration error

Questions regarding the use of the ANSI C SDK for Server or Client development or integration into customer products ...

Moderator: uasdkc

Post Reply
rittal-beck
Full Member
Full Member
Posts: 8
Joined: 15 Jan 2018, 07:16

SecurityPolicy configuration error

Post by rittal-beck »

Hello,

i have a problem to start the uaserver. I compiled the demo server and now i get the following error:

07:17:59.242|E|5AF04F40* Configuration error: SecurityPolicy of UserToken is not supported: http://opcfoundation.org/UA/SecurityPol ... c256Sha256
Cleanup Rittal Provider ...
Cleanup Rittal Provider DONE!
07:17:59.242|W|5AF04F40* Cleanup Server Provider ...
07:17:59.242|W|5AF04F40* Cleanup Server Provider DONE!
07:17:59.244|E|5AF04F40* UA Server: Main stopped due to error 0x80890000

I'm using 1.8. Hopefully somebody can help me with this. I'm sure it is not a big deal. Maybe somewhere in the configuration but I can't find anything about it in the documentation.

Thanks,

Kind regards

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: SecurityPolicy configuration error

Post by Support Team »

Hello rittal-beck,

in order to use the security policy "OpcUa_SecurityPolicy_Basic256Sha256", you need to compile in support for it in the UaStack. You can enable the different policies using the CMake options UASTACK_SUPPORT_SECURITYPOLICY_..., in your case UASTACK_SUPPORT_SECURITYPOLICY_BASIC256SHA256. After enabling it using CMake, recompile the UaStack and you will be able to use it.
Best regards
Unified Automation Support Team

rittal-beck
Full Member
Full Member
Posts: 8
Joined: 15 Jan 2018, 07:16

Re: SecurityPolicy configuration error

Post by rittal-beck »

Hello SupportTeam,

I just want to compiled it with UASTACK_SUPPORT_SECURITYPOLICY_NONE and i want that the demoserver runs with it.

I didn't get how to configure the demoserver with SECURITYPOLICY_NONE. I never configured that the demoserver is running with BASIC256SHA256.

I guess now it will run when i set the option Basic256Sha256 but how can I switch to NONE or any other mode? Do i have to configure something in any configuration file for the demoserver?

Kind regards

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: SecurityPolicy configuration error

Post by Support Team »

Hello rittal-beck,

for this you will need to modify the settings.conf/.ini next to the server which contains the configuration for the server. In the [Endpoints] section, disable everything using security in order to be able to use the SDK compiled with only UASTACK_SUPPORT_SECURITYPOLICY_NONE.
Best regards
Unified Automation Support Team

rittal-beck
Full Member
Full Member
Posts: 8
Joined: 15 Jan 2018, 07:16

Re: SecurityPolicy configuration error

Post by rittal-beck »

Hey SupportTeam,

it would be nice if you can give me an example how to configure the settings.conf.

I'm running into this again, and just to delete security options is a little bit to few information. I commented out all security options in the endpoint section and then i get other errors. So please give me an explicit example how I can get rid of that error. When you compile your demo_c_server application you have the same error so it won't be too much work.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: SecurityPolicy configuration error

Post by Support Team »

Hello rittal-beck,

when compiling the SDK as recommended, the settings file delivered with the SDK perfectly matches the resulting server binary and the server will start without problems. As explained in https://forum.unified-automation.com/topic3096.html, if you don't provide OpenSSL development files, you'll need to modify the settings file accordingly. Starting a server that doesn't support security with an endpoint requiring security will not work. How to configure an endpoint without security is fundamental OPC UA knowledge and out of scope of the SDK documentation, which goes into the details of the SDK specific implementation and interfaces. You might also want to have a look at our documentation about endpoint configuration at http://documentation.unified-automation ... nnect.html.
Best regards
Unified Automation Support Team

Post Reply