Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
abb9013e
Commit
abb9013e
authored
Mar 27, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-892: Different mutual authentication requirements for different types of connections.
parent
ca2d61ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
HttpBindManager.java
src/java/org/jivesoftware/openfire/http/HttpBindManager.java
+3
-1
ClientStanzaHandler.java
...va/org/jivesoftware/openfire/net/ClientStanzaHandler.java
+2
-1
No files found.
src/java/org/jivesoftware/openfire/http/HttpBindManager.java
View file @
abb9013e
...
@@ -88,6 +88,8 @@ public final class HttpBindManager {
...
@@ -88,6 +88,8 @@ public final class HttpBindManager {
public
static
final
String
HTTP_BIND_THREADS
=
"httpbind.client.processing.threads"
;
public
static
final
String
HTTP_BIND_THREADS
=
"httpbind.client.processing.threads"
;
public
static
final
String
HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY
=
"httpbind.client.cert.policy"
;
public
static
final
int
HTTP_BIND_THREADS_DEFAULT
=
8
;
public
static
final
int
HTTP_BIND_THREADS_DEFAULT
=
8
;
private
static
final
String
HTTP_BIND_FORWARDED
=
"httpbind.forwarded.enabled"
;
private
static
final
String
HTTP_BIND_FORWARDED
=
"httpbind.forwarded.enabled"
;
...
@@ -258,7 +260,7 @@ public final class HttpBindManager {
...
@@ -258,7 +260,7 @@ public final class HttpBindManager {
sslContextFactory
.
setKeyStoreType
(
SSLConfig
.
getStoreType
());
sslContextFactory
.
setKeyStoreType
(
SSLConfig
.
getStoreType
());
// Set policy for checking client certificates
// Set policy for checking client certificates
String
certPol
=
JiveGlobals
.
getProperty
(
"xmpp.client.cert.policy"
,
"disabled"
);
String
certPol
=
JiveGlobals
.
getProperty
(
HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY
,
"disabled"
);
if
(
certPol
.
equals
(
"needed"
))
{
if
(
certPol
.
equals
(
"needed"
))
{
sslContextFactory
.
setNeedClientAuth
(
true
);
sslContextFactory
.
setNeedClientAuth
(
true
);
sslContextFactory
.
setWantClientAuth
(
true
);
sslContextFactory
.
setWantClientAuth
(
true
);
...
...
src/java/org/jivesoftware/openfire/net/ClientStanzaHandler.java
View file @
abb9013e
...
@@ -23,6 +23,7 @@ import org.dom4j.Element;
...
@@ -23,6 +23,7 @@ import org.dom4j.Element;
import
org.jivesoftware.openfire.Connection
;
import
org.jivesoftware.openfire.Connection
;
import
org.jivesoftware.openfire.PacketRouter
;
import
org.jivesoftware.openfire.PacketRouter
;
import
org.jivesoftware.openfire.auth.UnauthorizedException
;
import
org.jivesoftware.openfire.auth.UnauthorizedException
;
import
org.jivesoftware.openfire.session.ConnectionSettings
;
import
org.jivesoftware.openfire.session.LocalClientSession
;
import
org.jivesoftware.openfire.session.LocalClientSession
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.jivesoftware.util.JiveGlobals
;
import
org.xmlpull.v1.XmlPullParser
;
import
org.xmlpull.v1.XmlPullParser
;
...
@@ -111,7 +112,7 @@ public class ClientStanzaHandler extends StanzaHandler {
...
@@ -111,7 +112,7 @@ public class ClientStanzaHandler extends StanzaHandler {
void
startTLS
()
throws
Exception
{
void
startTLS
()
throws
Exception
{
Connection
.
ClientAuth
policy
;
Connection
.
ClientAuth
policy
;
try
{
try
{
policy
=
Connection
.
ClientAuth
.
valueOf
(
JiveGlobals
.
getProperty
(
"xmpp.client.cert.policy"
,
"disabled"
));
policy
=
Connection
.
ClientAuth
.
valueOf
(
JiveGlobals
.
getProperty
(
ConnectionSettings
.
Client
.
AUTH_PER_CLIENTCERT_POLICY
,
"disabled"
));
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
e
)
{
policy
=
Connection
.
ClientAuth
.
disabled
;
policy
=
Connection
.
ClientAuth
.
disabled
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment