Comments (3)
a reproducer would be helpfull
from vert.x.
`
// This will obtain the token from local cache and connect to KDC to obtain token for the proxy
public String getToken() throws GSSException {
Oid spnegoOid = new Oid("1.3.6.1.5.5.2");
GSSManager manager = GSSManager.getInstance();
// This is the secure proxy server that we want to authenticate to using kerberos
String serverPrinciple = "[email protected]";
GSSName serverName = manager.createName(serverPrinciple, GSSName.NT_HOSTBASED_SERVICE);
GSSContext clientContext = manager.createContext(
serverName.canonicalize(spnegoOid), spnegoOid, null, GSSContext.DEFAULT_LIFETIME);
clientContext.requestMutualAuth(true);
byte[] clientToken = clientContext.initSecContext(new byte[0], 0, 0);
return Base64.getEncoder().encodeToString(clientToken);
}
@Test
public void testSecureProxy3(Vertx vertx, VertxTestContext ctx) throws GSSException {
System.setProperty("java.security.krb5.conf", "krb5.conf");
System.setProperty("java.security.auth.login.config", "jaas.conf");
System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
System.setProperty("sun.security.krb5.debug", "true");
System.setProperty("sun.security.jgss.debug", "true");
WebClientOptions wco = new WebClientOptions()
.setFollowRedirects(true)
.setSsl(true);
ProxyOptions po = new ProxyOptions()
.setHost("myproxy.com")
.setPort(1234);
wco.setProxyOptions(po);
WebClient wc = WebClient.create(vertx, wco);
String token = getToken();
wc
.getAbs("https://website_to_reach_through_proxy.com")
.putHeader("Proxy-Authorization", "Negotiate " + token)
.send()
.onFailure(error -> { // This is always returning 407 error code
System.out.println(error.getMessage());
ctx.failNow(error);
})
.onSuccess(result -> {
System.out.println(result);
ctx.completeNow();
});
}
`
from vert.x.
I'm afraid we don't support that in Vert.x, we support proxy authentication through Netty HttpProxyHandler
that only supports basic authentication. There are chances that this can be achieved by contributing an enhancement in Netty proxy handler.
from vert.x.
Related Issues (20)
- Configurable socket keep alive interval HOT 3
- Hash based load balancing policy
- ver.4.5.6 HttpServerRequest.isExpectMultipart wrong results returned.
- Vertx pooled allocator should be the same as Netty
- Fix for CVE-2024-29025
- Fix for CVE-2024-29025
- BlockedThreadChecker does not check a parking event loop virtual thread HOT 8
- Websocket batch processing / read completion event HOT 3
- webSocketHandler does not accept incoming websocket connection since vertx-core version 4.5.6 and later HOT 1
- Jackson's Hybrid pool should avoid using predicates to verify Thread::isVirtual HOT 1
- Provide an option to wait for all currently-being-processed / currently-queued requests / events to complete before closing vertx HOT 1
- JsonObject: The equals method fails when comparing integers with floats. HOT 1
- Request .send method invocation starts failing from 4.5.5 onward HOT 11
- route BodyHandler before ProxyHandler, response [ERROR] [2024-04-17 18:57:27] ?.?(?) | Connection was closed HOT 2
- Vertx eventbus not working even after cluster formation HOT 1
- Getting HttpClosedException: Connection was closed for alternate HTTP API calls HOT 1
- Previously clustered instances incorrectly cached HOT 1
- Vert.x does not respond appropriately for HTTP/1.1 request containing no Host header HOT 3
- Vertx Compatibility issue HOT 1
- HttpRequestImpl#connectTimeout does not support Fluent HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vert.x.