Excluding specific files when creating WAR files?

2024-06-10 Thread James H. H. Lampert
Please forgive me if this is a RTFM issue, or if it's outside the scope 
of this List (and this isn't exactly the first time I've imposed upon 
the friendly nature of this List, knowing that it's a much more 
forgiving environment than a lot of StackExchange forums are).


I've just been alerted that our WAR files contain ".DS_Store" (Mac OS 
desktop information) files.


So far as I'm aware, it's difficult or impossible to keep Mac OS from 
generating these files, but is there some WAR file generation parameter 
that can be used to exclude them?


--
JHHL

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Excluding specific files when creating WAR files?

2024-06-10 Thread Sebastian Trost

On 10.06.2024 19:09, James H. H. Lampert wrote:
Please forgive me if this is a RTFM issue, or if it's outside the 
scope of this List (and this isn't exactly the first time I've imposed 
upon the friendly nature of this List, knowing that it's a much more 
forgiving environment than a lot of StackExchange forums are).


I've just been alerted that our WAR files contain ".DS_Store" (Mac OS 
desktop information) files.


So far as I'm aware, it's difficult or impossible to keep Mac OS from 
generating these files, but is there some WAR file generation 
parameter that can be used to exclude them?
How do you generate your WAR files? With Maven? You should read the 
documentation at 
https://maven.apache.org/plugins/maven-war-plugin/examples/including-excluding-files-from-war.html


Generally, WAR files are built on the ZIP file format. You can open them 
with any ZIP util you like and remove those files.


Sebastian



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Excluding specific files when creating WAR files?

2024-06-10 Thread James H. H. Lampert

On 6/10/24 10:23 AM, Sebastian Trost wrote:
How do you generate your WAR files? With Maven? You should read the 
documentation at 
https://maven.apache.org/plugins/maven-war-plugin/examples/including-excluding-files-from-war.html


Generally, WAR files are built on the ZIP file format. You can open them 
with any ZIP util you like and remove those files.


Danke, Herr Trost.

Given that I can't remember the last time I personally generated a WAR 
file (although I'm pretty sure I've done it at least once), I haven't a 
clue.


I think our development environment is still Eclipse, and I vaguely 
recall having to install a Maven plug-in, the last time I had to 
reinstall Eclipse, but I don't remember our procedure for WAR file 
generation, assuming it's even the same as it was, the last time I did it.


I'm just the one who had to pick up the pieces when a customer's 
security scan found it, and objected to it.


--
JHHL

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Excluding specific files when creating WAR files?

2024-06-10 Thread Sebastian Trost

On 10.06.2024 19:47, James H. H. Lampert wrote:

Danke, Herr Trost.

Gern geschehen, Herr Lampert.


Given that I can't remember the last time I personally generated a WAR 
file (although I'm pretty sure I've done it at least once), I haven't 
a clue.


I think our development environment is still Eclipse, and I vaguely 
recall having to install a Maven plug-in, the last time I had to 
reinstall Eclipse, but I don't remember our procedure for WAR file 
generation, assuming it's even the same as it was, the last time I did 
it.


I'm just the one who had to pick up the pieces when a customer's 
security scan found it, and objected to it.
Well, to be more specific, in case you still want to rebuild this WAR 
file: Look for a pom.xml file in the root directory of your source. 
Inside that pom.xml file you just have to search for 
'maven-war-plugin' and add/change the 
packagingExcludes-Tag as described in the documentation I sent earlier. 
After that, rebuild the WAR file, open it with any ZIP file tool and 
check if there are still any Mac Os files in there and if there are 
none, ship the WAR to your customer.


Sebastian

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Excluding specific files when creating WAR files?

2024-06-10 Thread James H. H. Lampert

On 6/10/24 11:02 AM, Sebastian Trost wrote:

On 10.06.2024 19:47, James H. H. Lampert wrote:

Danke, Herr Trost.

Gern geschehen, Herr Lampert.


Alas, it doesn't look like WAR file generation is something we're doing 
with Maven: while at least one of our Eclipse projects has a pom.xml 
file, I could find no 'maven-war-plugin' in it, 
and the project in question doesn't have a pom.xml at all.


I *think* all we do to generate a WAR file is right-click the project in 
Eclipse, select Export, and select War File.


I've run "zip -d foo.war .DS_Store" on the WAR file, and passed it on to 
those who *do* generate WAR files on a regular basis. As long as the WAR 
file itself doesn't get signed (and I'm told it doesn't, just all the 
JARs therein), that should do it.


I hope.

--
JHHL

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: PKCS#8 encryption algorithm unrecognized

2024-06-10 Thread Timothy Resh
After much debugging, I have found the issue in my situation. In the
server.xml file, you must put keystoreType="PKCS12" for it to recognize the
keystore properly.

On Fri, Apr 5, 2024 at 4:27 AM Roberto Benedetti <
roberto.benede...@dedalus.eu> wrote:

> > I got the Object ID and version straight out of the Certificate using
> > Keystore Explorer.  I'm not sure why there is a difference.
>
> Keystore Explorer uses Bouncy Castle (https://www.bouncycastle.org/) as
> provider for JCE.
>
> If your JRE/JDK does not provide some algorithm you could use Bouncy
> Castle as well.
>
> Regards,
> Roberto
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat 9: Java 11 to Java 17

2024-06-10 Thread Ryan Esch
Hi folks,I have a webapp running Apache Tomcat 9.0.67 with Java 11, using 
JASPIC for authentication. For reference, using these:
            org.apache.tomcat            
tomcat-catalina            9.0.85
            org.apache.tomcat            
catalina            6.0.53
This works.I need to get this running with Java 17. I've updated my javax 
classes to jakarta and my JASPIC dependencies to:
            org.apache.tomcat            
tomcat-jaspic-api            
11.0.0-M5
            org.apache.tomcat            
tomcat-catalina            11.0.0-M5
These are built with Java 17. My webapp compiles and builds. But at runtime, I 
get errors like this:
java.lang.VerifyError: Bad type on operand stackException Details:  Reason:    
Type 'org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl' (current 
frame, stack[4]) is not assignable to 
'jakarta/security/auth/message/config/AuthConfigFactory'
Specifically, this does not cause any issues:          AuthConfigFactory 
factory = new AuthConfigFactoryImpl();
However, if I call any method on this factory, I see the above Error.I can't 
seem to figure out the cause. I don't see any old javax AuthConfig classes in 
the dependencies.Anyone familiar with this?
Ryan


Re: Tomcat 9: Java 11 to Java 17

2024-06-10 Thread Paul Leo
I could be wrong, but I don't think you need jakarta for Tomcat 9.  You 
need it for TomEE 9 and Tomcat 10.  But please someone verify.


On 6/10/2024 1:44 PM, Ryan Esch wrote:

Hi folks,I have a webapp running Apache Tomcat 9.0.67 with Java 11, using 
JASPIC for authentication. For reference, using these:
             org.apache.tomcat            
tomcat-catalina            9.0.85
             org.apache.tomcat            
catalina            6.0.53
This works.I need to get this running with Java 17. I've updated my javax 
classes to jakarta and my JASPIC dependencies to:
             org.apache.tomcat            
tomcat-jaspic-api            11.0.0-M5
             org.apache.tomcat            
tomcat-catalina            11.0.0-M5
These are built with Java 17. My webapp compiles and builds. But at runtime, I 
get errors like this:
java.lang.VerifyError: Bad type on operand stackException Details:  Reason:    
Type 'org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl' (current 
frame, stack[4]) is not assignable to 
'jakarta/security/auth/message/config/AuthConfigFactory'
Specifically, this does not cause any issues:          AuthConfigFactory 
factory = new AuthConfigFactoryImpl();
However, if I call any method on this factory, I see the above Error.I can't 
seem to figure out the cause. I don't see any old javax AuthConfig classes in 
the dependencies.Anyone familiar with this?
Ryan



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 9: Java 11 to Java 17

2024-06-10 Thread Chuck Caldarale


> On Jun 10, 2024, at 14:48, Paul Leo  wrote:
> 
> I could be wrong, but I don't think you need jakarta for Tomcat 9.  You need 
> it for TomEE 9 and Tomcat 10.  But please someone verify.


Not sure about TomEE, but Tomcat 9 certainly expects javax.* classes, not 
jakarta.* ones; the use of jakarta.* classes began with Tomcat 10.

At this point, the OP might want to consider switching to Tomcat 10, since the 
conversion to jakarta.* has already been done.

  - Chuck


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org