AMENDED:
For the military, brass means any officer who outranks the speaker: the people who make decisions which affect the speaker's life (usually with the suggestion that they don't much care how they affect the speaker's life).
(Civilians, however, generally use the term to refer to the upper echelons of command—"the brass in Saigon", for instance, during the Vietnam War.)
The term arises from the fact that in the US and English armies the primary insignia of rank for officers are pins on the collar, colored gold or silver but actually made of brass, while enlisted men wear shoulder patches of cloth and embroidery.
[ http://www.army.mil/symbols/armyranks.html] :
ell.stackexchange.com/users/32/StoneyB on hiatus
It's military slang for very high ranking officers.
Even though these generals and commanders make all the most important decisions that affect the troops on the ground, the infantry soldiers will never meet them face-to-face.
This means that it can feel like a big unseen force is controlling what they can and can't do, so whenever a decision reaches them they have to follow, they say it came 'from the brass'.
Even though a lieutenant is a commissioned officer, he wouldn't be referred to as 'the brass', as he's on or near the frontlines giving orders in person; if the soldiers object to an order they can talk to him.
But if he receives an order from his boss, who received the order from his boss, there's no room for argument.
There's no specific rank it refers to, since it doesn't matter who it came from.
The order has traveled down the chain of command until your commanding officer doesn't have the authority to let you raise objections.
ell.stackexchange.com/users/15703/Mark
"The brass" refers to officers, and it's shorthand for the older phrase "the brass hats."
From the OED: brass hat n.
[so called from the gilt insignia on an officer's cap] colloq.
(orig.
Mil.
slang)
a high-ranking officer in the armed forces, originally in the British army; cf.
tin hat n. 1b.
1887 Belfast News-let.
16
Mar. 7/4 Three officers..are to be tried by general court-martial for practical joking to a most unwarrantable extent with one of the brass hats of Dublin—we mean a staff officer.
ell.stackexchange.com/users/15966/TechnoBabblefish
Brass refers to commissioned officers.
ell.stackexchange.com/users/15932/Tass
Brass is a term used to denote officers, it comes from a time when enlisted personnel had cloth badges of rank, but officers had brass emblem (and had Batmen to polish them).
Top Brass refers to staff Officers (above brigadier), i.e did not directly command troops.
Hope this helps
ell.stackexchange.com/users/15938/John H
I'm submitting a distilled version of something I said in comments on another answer.
The "brass" when referring to military officers, only refers to commissioned officers, and never refers to non-commissioned officers in any context.
Because of the absolute, discrete boundary that exists between NCOs and commissioned officers, I would expect a negative reaction out of a high-ranking enlisted person whom is called "brass" by lower enlisted (for the same reason you very often hear NCOs and NCO veterans reply to being called "sir" with "I'm not an officer,
I work[ed] for a living").
"Brass" probably is best described as a placeholder term for commissioned officers above company-grade.
More specifically, commissioned officers above company-grade who are issuing orders to the unit.
Because there is often no direct benefit for the unit following the orders, this is sure to generate a lot of "because the brass says to do it" in response to questions about the orders which are a kind of "spukhaften fernwirkung".
From my many years of experience as an enlisted infantryman, by far the most common place to find this term -- used in reference to officers, instead of the definition of an empty shell casing, which is correct but out of context -- is in this situation.
Lower enlisted soldiers almost always question orders.
It's just a natural human motivation to be curious about directives.
And "brass" is most often used in response to these queries by NCOs or company-grade officers.
ell.stackexchange.com/users/15981/L0j1k
Brass can refer to the ammunition shell that is ejected from a weapon after it has been fired.
This was the first thing I thought of when I read the question since I'm uncertain as to whether the phrase is something the questioner came up with or if it was read somewhere.
I was in the military as an enlisted person.
Officers being referred to as Brass is something that I'm familiar with but more strongly related the reference to ammunition and not people.
ell.stackexchange.com/users/15945/Beth
"Brass to the grass" also refers to the proper loading alignment of U.S. military belt-fed machine guns.
The individual rounds are linked together with dark colored clips that are stripped off as they enter the weapon.
The clips are more visible on one side of the belt than the other.
When loading the ammo can or feed mechanism, the side with the linking clips faces up and the other side where the brass shell casings are more visible face down, i.e. "brass to the grass."
ell.stackexchange.com/users/46637/John P. Hagemann
In books by many different authors I encountered phrases like this:   He curses the brass for not caring whether he lives or dies.   From context, it seemed to me that it meant high-rank officers, about the rank of general. But sometimes it seems to mean lower (than general) rank commissioned officers, too. Sometimes civilian government officials overseeing army. So what does it really mean? And does it have anything to do with copper and zinc alloy?
What does "the brass" mean, exactly, in military context?
ell.stackexchange.com
<meaning-in-context><military>
ell.stackexchange.com/questions/48029
ell.stackexchange.com/users/15914/Mołot
The "brass" is military slang to refer to high-ranking military officers,  only  refers to commissioned officers, and  never  refers to non-commissioned officers in any context. It is shorthand for an old phrase "the brass hats."  Enlisted personnel had cloth badges of rank, whereas officers had a brass emblem. Brass refers to commissioned officers. It can also refer to ammunition.
Brass refers to commissioned officers. Brass can refer to ammunition.