I googled a lot regarding the error message “password is not set” when testing a datasource in WebSphere (18.104.22.168), but I did not find a solution. A co-worker finally found a solution (by accident?).
While having the application JVMs running, I created a new JAAS–J2C authenticator (in my case the same login but a different password), and changed the datasource to use the new authenticator. I saved the config and synchronized it. The files config/cells/cellname/nodes/nodename/resources.xml and config/cells/cellname/security.xml showed that the changes arrived on the node. Testing the datasource connectivity fails now with:
DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect to the DataSource. Encountered java.sql.SQLException: The application server rejected the connection. (Password is not set.)DSRA0010E: SQL State = 08004, Error Code = –99,999.
Restarting the application JVMs does not help.
After stopping everything (application JVMs, nodeagent and deployment manager) and starting everything again, the connection test of the datasource works directly as expected.
I have not tested if it is enough to just stop all application JVMs on one node and the correspding nodeagent, or if I really have to stop the deployment manager too.
GD Star Rating
GD Star Rating
Tags: accident problem
, co worker
, connection password
, connection test
, deployment manager
, java sql
, problem case
Recently we had a strange performance problem at work. A web application was having slow response times from time to time and users complained. We did not see an uncommon CPU/mem/swap usage on any involved machine. I generated heat-maps from performance measurements and there where no obvious traces of slow behavior. We did not find any reason why the application should be slow for clients, but obviously it was.
Then someone mentioned two recent apache DoS problems. Number one — the cookie hash issue — did not seem to be the cause, we did not see a huge CPU or memory consumption which we would expect to see with such an attack. The second one — the slow reads problem (no max connection duration timeout in apache, can be exploited by a small receive window for TCP) — looked like it could be an issue. The slow read DoS problem can be detected by looking at the server-status page.
What you would see on the server-status page are a lot of worker threads in the ‘W’ (write data) state. This is supposed to be an indication of slow reads. We did see this.
As our site is behind a reverse proxy with some kind of IDS/IPS feature, we took the reverse proxy out of the picture to get a better view of who is doing what (we do not have X-Forwarded-For configured).
At this point we noticed still a lot of connection in the ‘W’ state from the rev-proxy. This was strange, it was not supposed to do this. After restarting the rev-proxy (while the clients went directly to the webservers) we had those ‘W’ entries still in the server-status. This was getting really strange. And to add to this, the duration of the ‘W’ state from the rev-proxy tells that this state is active since several thousand seconds. Ugh. WTF?
Ok, next step: killing the offenders. First I verified in the list of connections in the server-status (extended-status is activated) that all worker threads with the rev–proxy connection of a given PID are in this strange state and no client request is active. Then I killed this particular PID. I wanted to do this until I do not have those strange connections anymore. Unfortunately I arrived at PIDs which were listed in the server-status (even after a refresh), but not available in the OS. That is bad. Very bad.
So the next step was to move all clients away from one webserver, and then to reboot this webserver completely to be sure the entire system is in a known good state for future monitoring (the big hammer approach).
As we did not know if this strange state was due to some kind of mis-administration of the system or not, we decided to have the rev-proxy again in front of the webserver and to monitor the systems.
We survived about one and a half day. After that all worker threads on all webservers where in this state. DoS. At this point we where sure there was something malicious going on (some days later our management showed us a mail from a company which offered security consulting 2 months before to make sure we do not get hit by a DDoS during the holiday season… a coincidence?).
Next step, verification of missing security patches (unfortunately it is not us who decides which patches we apply to the systems). What we noticed is, that the rev-proxy is missing a patch for a DoS problem, and for the webservers a new fixpack was scheduled to be released not far in the future (as of this writing: it is available now).
Since we applied the DoS fix for the rev-proxy, we do not have a problem anymore. This is not really conclusive, as we do not really know if this fixed the problem or if the attacker stopped attacking us.
From reading what the DoS patch fixes, we would assume we should see some continuous traffic going on between the rev-rpoxy and the webserver, but there was nothing when we observed the strange state.
We are still not allowed to apply patches as we think we should do, but at least we have a better monitoring in place to watch out for this particular problem (activate the extended status in apache/IHS, look for lines with state ‘W’ and a long duration (column ‘SS’), raise an alert if the duration is higher than the max. possible/expected/desired duration for all possible URLs).
GD Star Rating
GD Star Rating
Tags: dos problem
, dos problems
, memory consumption
, performance measurements
, performance problem
, proxy connection
, reverse proxy
, slow response times
, swap usage
, worker threads
I was fighting with the right way to add a recent Verisign certificate to a keystore for the IBM HTTP Server (IHS). I have used the ikeyman utility on Solaris.
The problem indicator was the error message “SSL0208E: SSL Handshake Failed, Certificate validation error” in the SSL log of IHS.
The IBM websites where not really helpful to track down the problem (the missing stuff). The Verisign instructions did not lead to a working solution either.
What was done before: the Verisign Intermediate Certificates where imported as “Signer Certificates”, and the certificate for the webserver was imported within “Personal Certificates”. Without the signer certificates the personal certificate would not import due to an intermediate certificated missing (no valid trust-chain).
What I did to resolve the problem:
- I removed all Verisign certificates.
- I added the Verisign Root Certificate and the Verisign Intermediate Certificate A as a signer certificate (use the “Add” button). I also tried to add the Verisign Intermediate Certificate B, but it complained that some part of it was already there as part of the Intermediate Certificate A. I skipped this part.
- Then I converted the server certificate and key to a PKS12 file via “openssl pkcs12 –export –in server-cert.arm –out cert-for-ihs.p12 –inkey server-key.arm –name name_for_cert_in_ihs”.
- After that I imported the cert-for-ihs.p12 as a “Personal Certificate”. The import dialog offers 3 items to import. I selected the “name_for_cert_in_ihs” and the one containing “cn=verisign class 3 public primary certification authority — g5” (when I selected the 3rd one too, it complained that a part of it was already imported with a different name).
With this modified keystore in place, I just had to select the certificate via “SSLServerCert name_for_cert_in_ihs” in the IHS config and the problem was fixed.
GD Star Rating
GD Star Rating
Tags: ibm http server
, intermediate certificate
, intermediate certificates
, personal certificate
, personal certificates
, server cert
, validation error
, verisign certificate
, verisign certificates
I have a little problem finding a clean solution to the following problem.
A machine with two network interfaces and no default route. The first interface gets an IP at boot time and the corresponding static route is inserted during boot into the routing table without problems. The second interface only gets an IP address when the shared-IP zones on the machine are started, during boot the interface is plumbed but without any address. The networks on those interfaces are not connected and the machine is not a gateway (this means we have a machine–administration network and a production-network). The static routes we want to have for the addresses of the zones are not added to the routing table, because the next hop is not reachable at the time the routing-setup is done. As soon as the zones are up (and the interface gets an IP), a re-run of the routing-setup adds the missing static routes.
Unfortunately I can not tell Solaris to keep the static route even if the next hop is not reachable ATM (at least I have not found an option to the route command which does this).
One solution to this problem would be to add an address at boot to the interface which does not have an address at boot-time ATM (probably with the deprecated flag set). The problem is, that this subnet (/28) has not enough free addresses anymore, so this is not an option.
Another solution is to use a script which re-runs the routing-setup after the zones are started. This is a pragmatic solution, but not a clean solution.
As I understand the in.routed man-page in.routed is not an option with the default config, because the machine shall not route between the networks, and shall not change the routing based upon RIP messages from other machines. Unfortunately I do not know enough about it to be sure, and I do not get the time to play around with this. I have seen some intersting options regarding this in the man-page, but playing around with this and sniffing the network to see what happens, is not an option ATM. Anyone with a config/tutorial for this “do not broadcast anything, do not accept anything from outside”-case (if possible)?
GD Star Rating
GD Star Rating
Tags: administration network
, boot time
, clean solution
, default config
, default route
, network interfaces
, pragmatic solution
, routing table
, static route
, static routes
Recently I switched to a new client where the Solaris Security Toolkit (JASS) is extensively used. I am now in the process of updating some things, among them are JET and JASS. As part of this work I reevaluate the local JASS modifications. Previously a custom JASS package was used, but in case JASS is updated by Oracle at some point in time (and an update is really needed, see below), this would need some amount of work to find out the differences and to forward port them to the new version. If everything is well documented, this should not be hard to do, but the person doing the work also needs to find the up-to-date docs.
To make it more easy I decided to change this. I now install the official JASS package via JET together with the latest patch for it, and then let JET copy our modifications over the installed package. Instead of modifying existing drivers, I created our own drivers with a reference to the driver which served as a base.
While doing this I encountered several shortcomings of JASS on Solaris 10.
There are several FS based checks which do not make sense to do for the FS of zones in a global zone (at least not the way I use JASS, so maybe a configurable way of changing the behavior should serve for everyone). If zones are installed in /zones, you do not need to check for files without valid UIDs (you surely find a lot of files, as the users are defined inside the zones and not in the global zone) or similar things (even not for world writable files, as the zones are installed in a root-access-only subtree and inside the zones there may be other security constraints configured inside JASS, read: it is the responsibility of JASS inside the zone to do this). An easy solution would be to exclude those FS which contain zones (and as we only have one subtree, I just hardcoded this in several scripts).
I also miss the possibility (maybe I overlooked a simple way) for the ssh check to limit the AllowRootLogin to specific hosts. JASS only checks yes or no, but can not limit it to specific hosts (e.g. via “Match IP/hostname”). Often you do not need to permit root-logins (RBAC/sudo/…), but sometimes it is the only way to handle a particular edge-case (or to speed up an action dramatically), and in such cases you do not want to allow root-logins more than necessary.
GD Star Rating
GD Star Rating
Tags: easy solution
, forward port
, point in time
, security constraints
, solaris 10
, solaris security
, world writable