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
Getting Bad_IdentityTokenRejected error
February 21, 2023
10:56, EET
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

OPCUA Server-b communication is getting failure. Due to this OPCUA Client is not able to communicate with OPCUA Server and Message on CP proxy is showing as “Bad_IdentityTokenRejected”.

February 21, 2023
11:42, EET
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 330
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

Getting Bad_IdentityTokenRejected StatusCode means that the Server has rejected the credentials that were used to attempt to activate a Session. This StatusCode can mean that either the given credentials were incorrect or the Server does not support the selected UserTokeType at all.

Is the Server or the Client developed with Prosys OPC UA SDK for Java?

February 22, 2023
7:18, EET
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

Yes, both developed with Prosys OPC UA SDK for Java

February 22, 2023
8:02, EET
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 330
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

What type of IdentityToken are you trying to use? Anonymous, UsernameAndPassword, UserCertificate or something else? If you’re getting Bad_IdentityTokenRejected StatusCode and think the IdentityToken you’re using is correct, there might be something wrong with the Server’s user authentication implementation. This is done by a class that implements the UserValidator interface.

February 27, 2023
13:20, EET
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

Using UsernameAndPassword

February 27, 2023
14:15, EET
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 330
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

That would suggest that either the Server does not support the given combination of username and password or it does not support using UsernameAndPassword IdentityTokens at all.

Please take a look at the MyUserValidator class of SampleConsoleServer sample project for an example of how to check usernames and passwords on the Server side.

Also, make sure that the Server has been configured to support UsernameAndPassword UserTokenPolicy. Take a look at the initialize method of SampleConsoleServer class for an example of how to configure supported UserTokenPolicies.

March 6, 2023
18:32, EET
Avatar
u423017
Member
Members
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

Hi,

So what exactly happening is when we are requesting multiple data from server, we are getting this(Bad_IdentityTokenRejected) error, but when we request less data from server, then it is working fine.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 142

pramanj: 86

Francesco Zambon: 83

rocket science: 82

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 704

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1482

Posts: 6316

Newest Members:

samui, TommyDab, wross, Jeremyknock, Pedromon, DonaldEdism, Miguelplese, Scotanine, katesalas95, Petertum

Moderators: Jouni Aro: 1015, Pyry: 1, Petri: 0, Bjarne Boström: 994, Jimmy Ni: 26, Matti Siponen: 330, Lusetti: 0

Administrators: admin: 1