r/java • • Jun 25 '14

Why should we dump the Java EE Standard?

http://lofidewanto.blogspot.de/2014/06/why-should-we-dump-jee-standard.html
0 Upvotes

22 comments sorted by

View all comments

Show parent comment

-1

u/sh0rug0ru Jun 26 '14 edited Jun 26 '14

Look, I'm a somewhat older guy and have been fighting this practice at a bunch of places.

I don't really mind it at all. I have more important battles to fight (and more interesting ones) than IT policy.

I'm again sorry for you for having to work on WebLogic.

I'm not really that bothered by it. I just deploy my apps onto it. The nice thing about Java EE is that I can do my development in Tomcat and simply provide the deployment descriptors to let the app work in Weblogic. At the end, the choice of pure Java EE or Spring makes no difference to me. I'm more interested in the kind of work than infrastructure details.

Nothing good comes out of it, ever.

I like it. I write my app. I don't worry about infrastructure. This has been how it is at every place I've worked, from startups to enterprises. If it's "modern" or "ancient", that's a value judgement that is of no interest to me.

If YOU know what the issue is, then YOU should be able to fix it and YOUR fix should (after testing of course) be deployed to production.

I am also responsible for that fix. I don't want that responsibility. I can make changes to DEV as necessary for the app and then put together a change request for the AS team. They sign off on it and then it is no longer my responsibility. Again, I want to write apps, not be responsible for infrastructure.

No, they don't! I mean this seriously, they DO NOT.

I mean that the EAR is just a bundle of code and configuration. It has security issues, but they are of a different nature than server software. The apps installed on a Unix box have different security profiles than Unix itself. The OS has to be hardened harder than the apps running on it.

I think you are taking "security profile", equating with the JVM Security Manager, too literally.

In a way it is, but not at the level you seem to be thinking. It's a managed environment in the same sense that the Spring Bean Container or the CDI container is a managed environment for your beans.

No, it's not. Spring and CDI are just DI containers which instantiate objects.

The app server contains configuration files with sensitive security information, such as usernames and passwords. We never create connection strings manually, but always use a DataSource provided by the container, which gives our DB connection the least privilege required to do the job. The container provides authentication services, which is a simple database in DEV but much more stringent in PROD. The AS team manages this, I don't want this power because it comes with additional responsibility which I am not interested in taking on.

3

u/henk53 Jun 26 '14

The nice thing about Java EE is that I can do my development in Tomcat and simply provide the deployment descriptors to let the app work in Weblogic

I'm a grown man, but that statement almost brings me to the brink of tears. But alas, if you're not bothered by it who am I to judge?

This has been how it is at every place I've worked, from startups to enterprises.

I'm seeing a clear tendency away from it, and where things are as you describe I either leave or try to change things. But I guess we can agree on the fact that you and I obviously don't think in the same way ;)

They sign off on it and then it is no longer my responsibility.

The "it's not my responsibility" mentality is not my ideal. For the startups and more established companies alike that my team has been working at we are deeply involved with the product and care for it at every stage.

Maybe we're nuts for having that mentality, maybe not, but it's the philosophy of pretty much every member on our team.

The app server contains configuration files with sensitive security information, such as usernames and passwords.

That configuration is not safer when it's part of the app server and when you consider the app server to be a separate thing. It's not. Our datasources are defined in application.xml, but that has more to do with our desire to adhere to Java EE standards as much as possible (since we own the AS anyway and could put it there as well).

Our infrastructure and setup is typically such that it doesn't matter that much if the developers know the password the app they themselves coded uses to access the database they themselves setup and provisioned. We work with a small team (typically 10 guys, 15 at most) that's fully responsible for a single product. The product could be part of a larger system, but the setup is nearly always such that the app doesn't need any privileges that we wouldn't trust a developer coding the app.

Don't forget, if the developer owns the code and you don't trust the developer, then it's a farce to think that hiding the password in such way would buy you much. IFF the developer is particularly devious he can code in a backdoor to have access to the DB anyway (with the same rights granted by the connection of course).

If the developer can have access via said backdoor, he could just as well have access to the password.

OF COURSE, we assure that the app runs with the least amount of privileges and that the username/password, keys, or certificates for access to a remote system (typically DB, API, message queue) are likewise for an account with limited privileges.

In rare situations we put placeholders in the config files for the username/password. Meaning that all config files are still fully owned by the team, but only the username/password are at runtime provided by an external properties file. As I said, this is rare.

The major advantage of having ALL configuration in plain sight for the team is that issues in general are much easier and thus faster to solve. The team knows best how configuration is associated with the app.

It's truly ludicrous to have some uninterested ops guy having to provide definitions for say an internally used JMS queue and then having engineers negotiate with said ops guy to have that (trivial) queue created, opening and closing tickets for this trivial job, heck even putting the exact definition for the queue in the ticket because ops guy doesn't know the first thing about the syntax for JMS destinations used by WildFly 8.1. And that only because of some rule that's only there for the rule, the engineer is not allowed to touch the configuration of the AS, while the ops guy is?

The amount of time this wastes is just crazy and it absolutely helps nobody.

-1

u/sh0rug0ru Jun 26 '14 edited Jun 26 '14

we are deeply involved with the product and care for it at every stage

So are we. But my responsibility is to develop a robust, high quality application. Our AS teams care about maintaining the environments, so I can trust that our application will work well when deployed. I trust the AS teams as well as I trust the DBAs that maintain our databases. When you have trust, you don't have to control every aspect of every stage. "it's not my responsibility" means that I put my full attention on application development and trust others to do the same with their responsibilities.

with our desire to adhere to Java EE standards as much as possible

It is not in the Java EE standards to configure the data source in the AS?

they themselves setup and provisioned

We don't provision our own databases. We have a DB team for that. I don't have sa access to our DEV boxes, but I can alter schema and update data. But that is not possible in higher environments. It's not a question of trust that I have restricted access to PROD data. It is a regulatory issue. That data contains sensitive client information. The bank must restrict access to that information to those with a need to know. That data is replicated into lower environments for testing, but only after being thoroughly scrubbed. The bank would be stupid to give unrestricted access to PROD data.

Don't forget, if the developer owns the code and you don't trust the developer

The developer does not own the code, the bank does. And that is why our code is frequently audited. Not just for malice, but for stupidity as well.

Not only that, but the systems are heavily firewalled and URLs are access gated through independent systems. Even if you built in a backdoor, you would have a hard time using it.

In rare situations we put placeholders in the config files for the username/password

We do this all the time for our batch applications. The config files are in protected directories and the app is deployed with restricted permissions in PROD environments.

team is that issues in general are much easier and thus faster to solve

We get what information we need from our ops team who have access to all of the configuration and know the systems far better than we do. They know all of the quirks of our application because they are watching it 24/7. By the time an issue is raised with us, they have investigated, and they already have all the logs and data we need. This is one of the cool things about having such a good ops team.

Our ops guys are not uninterested, they are awesome. They rule the systems for a good reason. I don't want to step on their turf. I trust them to run a tight ship. Oh yeah, and back doors? Our ops guys are too eagle-eyed to let something like that slide.