คำถามติดแท็ก db2

1
ส่วน realm ที่ว่างเปล่าไม่ได้รับอนุญาตให้ใช้ Kerberos Authentication ผ่าน DB2
ฉันกำลังพยายามเชื่อมต่อกับเซิร์ฟเวอร์ Db2 ผ่าน Kerberos Environment ฉันกำลังใช้ DB2SimpleDataSource ในรหัสของฉันเพื่อรับการเชื่อมต่อกับเซิร์ฟเวอร์ DB2 ของฉัน ตามความเข้าใจปัจจุบันของฉันถ้าฉันมี kerberos tgt ฉันแค่ต้องเพิ่มคุณสมบัติสองอย่างใน Datasource, SecurityMechanism และ kerberosServerPrincipal ต่อไปนี้เป็นรหัส: public static DB2BaseDataSource getDataSource() throws Exception { DB2SimpleDataSource ds = new DB2SimpleDataSource(); ds.setPortNumber(port); ds.setDatabaseName(dbname); ds.setServerName(server); ds.setSecurityMechanism(DB2BaseDataSource.KERBEROS_SECURITY); ds.setKerberosServerPrincipal("user/server@REALM.COM"); ds.setDriverType(4); return ds; } จากนั้นรหัสต่อไปนี้เพื่อรับการเชื่อมต่อ: DataSource ds = (DataSource) getDataSource(); Connection con = ds.getConnection(); …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.