Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6752917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:06:00+00:00 2026-05-26T13:06:00+00:00

Note: I will be answering my own question… just wanted to add this tidbit

  • 0

Note: I will be answering my own question… just wanted to add this tidbit to the collective wisdom of The Internets.

I’ve successfully configured certificate authentication on my JBoss 5.1.0.GA server, largely with the help of the information on this page: http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch8.chapter.html

I have one context (let’s call it /openContext) that doesn’t require any authentication, and another context (let’s call it /securedContext) that requires client certificate authentication (i.e., it’s configured to use CLIENT-CERT in web.xml). When using JBoss’s default web connector, this works splendidly. I can hit http://myhost/openContext and I’m not prompted for a certificate, but when I hit http://myhost/securedContext, I’m prompted for a client certificate as I’d expect.

However, when I install JBossWeb Native and use APR as my web connector, I’m no longer prompted for a certificate when I hit http://myhost/securedContext.

My APR connector config in server.xml looks like:

<Connector protocol="HTTP/1.1" SSLEnabled="true"
    port="8443" address="${jboss.bind.address}"
    scheme="https" secure="true" clientAuth="false"
    SSLProtocol="SSLv3+TLSv1"
    SSLCipherSuite="ALL:!ADH:!SSLv2:!EXPORT40:!EXP:!LOW"
    SSLRandomSeed="/dev/urandom"
    SSLCertificateFile="/etc/pki/tls/certs/mycert.crt"
    SSLCertificateKeyFile="/etc/pki/tls/private/mycert.key"
    SSLPassword="mypasswordwhichiassureyouisbetterthanthisone"
    SSLCACertificateFile="/etc/pki/tls/certs/clientCAs.crt"
/>

I’ve also tried adding the SSLVerifyClient parameter to that configuration and setting it to optional, but that prompts for a certificate in both /openContext and /securedContext, which isn’t the behavior I want.

How can I get JBoss with APR to require certificate authentication for one web context, but not another web context?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:06:01+00:00Added an answer on May 26, 2026 at 1:06 pm

    What worked for me was to just add a whole new web connector, and have clients use that alternate port for the secured web context. My connectors config now looks like:

    <Connector protocol="HTTP/1.1" SSLEnabled="true"
        port="8443" address="${jboss.bind.address}"
        scheme="https" secure="true" clientAuth="false"
        SSLProtocol="SSLv3+TLSv1"
        SSLCipherSuite="ALL:!ADH:!SSLv2:!EXPORT40:!EXP:!LOW"
        SSLRandomSeed="/dev/urandom"
        SSLCertificateFile="/etc/pki/tls/certs/mycert.crt"
        SSLCertificateKeyFile="/etc/pki/tls/private/mycert.key"
        SSLPassword="mypasswordwhichiassureyouisbetterthanthisone"
    />
    <Connector protocol="HTTP/1.1" SSLEnabled="true"
        port="8543" address="${jboss.bind.address}"
        scheme="https" secure="true" clientAuth="true"
        SSLProtocol="SSLv3+TLSv1"
        SSLCipherSuite="ALL:!ADH:!SSLv2:!EXPORT40:!EXP:!LOW"
        SSLRandomSeed="/dev/urandom"
        SSLCertificateFile="/etc/pki/tls/certs/mycert.crt"
        SSLCertificateKeyFile="/etc/pki/tls/private/mycert.key"
        SSLPassword="mypasswordwhichiassureyouisbetterthanthisone"
        SSLCACertificateFile="/etc/pki/tls/certs/clientCAs.crt"
        SSLVerifyClient="require"
    />
    

    Now, if I hit http://myhost:8443/openContext, I’m not prompted for a certificate, but when I hit http://myhost:8543/securedContext, I am prompted for a certificate. Of course, I can still access either web app with the “wrong” port, but the consequences are negligible for my purposes. If a client hits http://myhost:8443/securedContext, they simply get an HTTP authentication error. If a client hits http://myhost:8543/openContext, they’re prompted for a client certificate. If they provide one, great (though I don’t care who you are), and if they don’t provide one or provide an invalid one, they get an HTTP auth error (they should have used the correct port in the first place).

    I’m pretty sure there’s an alternative way to get this working without requiring a second connector by putting httpd in front of JBoss and doing some clever configuration there, but this worked well enough for my purposes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note - I will really appreciate a quick and complete answer to this question.
Screenshot Important Note : This application does not support Internet Explorer. I will be
i have this page . login: fer password: m Note: after login you will
Note: Originally this question was asked for PostgreSQL, however, the answer applies to almost
<textarea name=notesrows=2 cols=70 readonly><?php if(!empty($this->log_note)){ echo $this->log_note;} ?> </textarea><br><br> <label for=add_note> Add Note </label>
I'm trying to implement a Question Answering System based on software engineering ontology. This
This might be odd question but I am just goig to start a new
See this image: http://i56.tinypic.com/311vw51.png You will note that part of the border of image
I'm looking for a simple C# script that will export an SVN folder. note:
Can i do the following in a silverlight page/app? (Note: the silverlight app will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.