简体   繁体   English

2个Java线程可以作为两个不同的Kerberos用户进行身份验证(在同一个进程中)吗?

[英]Can 2 Java threads authenticate as two different Kerberos users (in the same process)?

How can 2 Java threads (of the same process, same machine) each create their own Kerberos ticket? 2个Java线程(同一个进程,同一台机器)如何创建自己的Kerberos票证?

My concern is that usually, once a Kerberos ticket is created on a machine, it will be used by all other processes on the machine. 我担心的是,通常,一旦在机器上创建了Kerberos票证,它就会被机器上的所有其他进程使用。

I am planning to use Java's default Kerberos libraries , but I haven't started yet so I am open to any suggestion (must be open-source). 我打算使用Java的默认Kerberos库 ,但我还没有开始,所以我愿意接受任何建议(必须是开源的)。

A small hello world that connects to http://server via Kerberos as thread1-user1-password1 and thread2-user2-password2 would be awesome! 一个小的hello world通过Kerberos作为thread1-user1-password1和thread2-user2-password2连接到http://server会很棒!


Context: I want to write a load-testing tool: 上下文:我想编写一个负载测试工具:

  • My tool launches 100 threads, 我的工具启动了100个线程,
  • Each thread logs in as a different Kerberos user, 每个线程以不同的Kerberos用户身份登录,
  • Once logged, each thread starts sending requests. 记录后,每个线程都会开始发送请求。

Doing the load-test as several users is important, as each user has its own cache etc. 作为多个用户进行负载测试很重要,因为每个用户都有自己的缓存等。
Kerberos can not be disabled/circumvented, because the purpose is also to test Kerberos. 无法禁用/规避Kerberos,因为其目的也是测试Kerberos。

The authentication belongs to the GSS context, not the JVM. 身份验证属于GSS上下文,而不是JVM。 You can have as many contexts as you like, ergo as many tickets and authentications as you like. 您可以拥有任意数量的上下文,您可以随心所欲地获得许多票证和身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用证书和Kerberos对用户进行身份验证? - authenticate users with certificate and Kerberos? 以编程方式检查Java中两个线程是否属于同一进程 - Programatically check if two threads belong to the same process in Java Java可以理解具有相同名称的线程是不同的线程吗? - Can Java understand that threads which have same name are different threads? 在同一Java应用程序中使用不同的Kerberos KDC进行身份验证 - Authenticating with different Kerberos KDC in the same Java application 两个线程可以在同一时间运行两种不同的方法吗? - Can two threads run two different methods at the same point of time? 一个类可以为Java中的两个不同线程提供两个运行方法吗? - Can a class have two run methods for two different threads in Java? 从同一过程访问两个安全(Kerberos)Hadoop / HBase群集 - Access two secured (Kerberos) Hadoop / HBase clusters from the same process 使用Kerberos和WAS7对应用程序用户进行身份验证 - Authenticate application users using Kerberos and WAS7 我可以使用两个不同的线程在同一个套接字上读写吗? - Can I read and write on the same socket using two different threads? 两个线程可以分配给不同的处理器并同时执行吗? - Can two threads be assigned to different processors and execute at the same time?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM