Skip to content

Add Kerberos byte[] support to AS400JDBCDriver#332

Open
Chaitanya0114 wants to merge 5 commits into
IBM:mainfrom
Chaitanya0114:kerberosauth-byte
Open

Add Kerberos byte[] support to AS400JDBCDriver#332
Chaitanya0114 wants to merge 5 commits into
IBM:mainfrom
Chaitanya0114:kerberosauth-byte

Conversation

@Chaitanya0114

Copy link
Copy Markdown
Collaborator

#330 Got merged and this PR adds Kerberos byte[] support to AS400JDBCDriver

Signed-off-by: Yeluri Chaitanya <Yeluri.Chaitanya1@ibm.com>
@Chaitanya0114 Chaitanya0114 self-assigned this Jun 8, 2026
@Chaitanya0114

Copy link
Copy Markdown
Collaborator Author

Hi @jeber-ibm , Can you please verify the changes. I've changed "setKerbTicket(byte[])" method in "AS400" public so it can be used by external components.
Also added new APIs in "AS400JDBCDriver": "connect(AS400, byte[])" and "connect(AS400, byte[], boolean)" to accept a Kerberos ticket and pass it via "setKerbTicket()" before invoking "initializeConnection()".

@jeber-ibm jeber-ibm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add additional methods as indicated in the review.

Align RowSet Kerberos setter with property change pattern

Add kerberosTicket_ field to RowSet

Signed-off-by: Yeluri Chaitanya <Yeluri.Chaitanya1@ibm.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AS400 object should already have had the kerberos ticket set on the AS400 object. But if you think these methods are needed, then they can be kept.

I would like to see the following methods added to the AS400JDBCDriver class.

public java.sql.Connection connect (String url, byte[] kerberosTicket)

public java.sql.Connection connect (String url, Properties info, byte[] kerberosTicket)

You will also need methods to set the ticket on the AS400JDBCDataSource and AS400JDBCManagedDataSource classes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add some Javadoc for the setKerbTicket method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add some Javadoc for this new method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc needed for the new public method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to make a protected copy of the kerberosTicket_ (look how the password is protected). You also need to use the kerboseTicket_ to make a connection (instead of using a password to make a connection).

Signed-off-by: Yeluri Chaitanya <Yeluri.Chaitanya1@ibm.com>
Signed-off-by: Yeluri Chaitanya <Yeluri.Chaitanya1@ibm.com>
@Chaitanya0114 Chaitanya0114 requested a review from jeber-ibm June 23, 2026 04:49
…et_ to make a connection

Signed-off-by: Yeluri Chaitanya <Yeluri.Chaitanya1@ibm.com>
@Chaitanya0114

Copy link
Copy Markdown
Collaborator Author

Hi @jeber-ibm , Can you please check on my new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants