Cyber Security Brasilby Igor Deungaro

Authentication in MCP: What Exists, What Is Missing, What You Can Improvise

Authentication in MCP: What Exists, What Is Missing, What You Can Improvise

There is a common criticism — “MCP has no authentication” — that used to be true and no longer is. The specification defines an authorization model. The problem shifted from “it does not exist” to “it exists and almost nobody implements it”, which is a different and more tractable problem.

The model, in three obligations

The June 2025 revision reclassified the MCP server as a pure OAuth resource server — it does not authenticate users, does not issue tokens, does not manage login. Three tasks remain:

  • Answer 401 with a WWW-Authenticate header pointing at the protected resource metadata document.
  • Publish that document per RFC 9728, naming which authorization server it trusts and which scopes exist.
  • Reject every token not issued for it — audience validation. This is the only genuinely critical item and the one most often skipped.

The client acts as an OAuth 2.1 client, with PKCE mandatory using S256, and discovers the authorization server through the metadata chain. Later revisions tightened issuer validation and client registration.

The distance between spec and reality

Astrix's audit of more than 5,200 servers found 88% requiring credentials of some kind, 53% relying on static keys or personal access tokens, and only 8.5% using OAuth. Seventy-nine per cent passed keys through environment variables.

This is not a specification gap. It is an adoption gap — which is exactly where a security function has something to do.

What to do when you cannot rewrite the server

Much of what runs in production is third-party code you do not control. Treat it as a legacy service without authentication — a problem the industry already solved:

  • Put a gateway in front doing token validation and mTLS termination, and restrict the server to accept connections only from the gateway.
  • Swap static keys for short-lived credentials wherever the destination service allows it.
  • Get the secret out of the environment variable and inject it through a mounted file with restrictive permissions or a secrets provider — environment variables leak in process dumps, crash logs and any tool that lists the environment.
  • If the server does not validate audience, make sure it only ever receives tokens from a single issuer, and that this issuer serves no other audience.

None of these measures is new. They are the same playbook for putting an old internal service behind modern control — applied to a component the organisation has not yet classified as a service.

Este blog publica em português e inglês. / This blog publishes in Portuguese and English. EN · PT

Denunciar abuso

As inseguranças do sucesso da segurança cibernética

As inseguranças do sucesso da segurança cibernética. Tornar-se um grande profissional não precisa custar sua felicidade, mas a cultura da moagem torna isso provável. Nos últimos anos, a questão da saúde mental no setor de segurança cibernética ganhou destaque. Uma  pesquisa de 2019  revelou que 1 em cada 6 CISOs admitiu se  automedicar  para lidar com o estresse de seu trabalho. A tensão passa pelo escritório do CISO e permeia todo o setor. Um perfil que está crescendo  mais rápido que o orçamento  e uma sofisticação cada vez maior e  o impacto financeiro  dos ataques se combinam para transformar o que antes era um canto do departamento de TI em uma panela de pressão. John Hammond  , pesquisador de segurança cibernética da Huntress, falou sobre “ Hard Truths and Unexpected Realities: Lamentations in Producing Cybersecurity Content ” na  Intigriti 1337UP Live  , uma conferência online sobre bugs, em março de 2022. Seus...

DICA: comandos para pentest e segurança ofensiva

Fala galera, blz ? Segue uma lista de comandos maravilhosa, voltada para teste de vulnerabilidades. Observação Pertinente: Os TIPOS de COMANDOS e as INSTRUÇÕES estão em INGLÊS! NÂO ME RESPONSABILIZO POR USO INDEVIDO. Pré-requisitos: ✔️  Python 3.5 ✔️  OS que suporte Python (eu utilizei Kali) Reconnaissance / Enumeration Extracting Live IPs from Nmap Scan nmap 10.1.1.1 --open -oG scan-results; cat scan-results | grep "/open" | cut -d " " -f 2 > exposed-services-ips Simple Port Knocking for x in 7000 8000 9000; do nmap -Pn –host_timeout 201 –max-retries 0 -p $x 1.1.1.1; done DNS lookups, Zone Transfers & Brute-Force whois domain.com dig {a|txt|ns|mx} domain.com dig {a|txt|ns|mx} domain.com @ns1.domain.com host -t {a|txt|ns|mx} megacorpone.com host -a megacorpone.com host -l megacorpone.com ns1.megacorpone.com dnsrecon -d megacorpone.com -t axfr @ns2.megacorpone.com dnsenum domain.com nslookup -> set type=any -> ls -d domain.com for ...

Atacantes precisam de menos de 10 horas para encontrar fraquezas

Atacantes precisam de menos de 10 horas para encontrar fraquezas. Configurações vulneráveis, falhas de software e serviços da Web expostos permitem que hackers encontrem pontos fracos exploráveis ​​nos perímetros das empresas em apenas algumas horas, não em dias. O hacker ético médio pode encontrar uma vulnerabilidade que permite a violação do perímetro da rede e, em seguida, explorar o ambiente em menos de 10 horas, com testadores de penetração focados na segurança da nuvem obtendo acesso mais rapidamente aos ativos direcionados. Além disso, uma vez que uma vulnerabilidade ou fraqueza é encontrada, cerca de 58% dos hackers éticos podem invadir um ambiente em menos de cinco horas. Isso está de acordo com uma pesquisa com 300 especialistas do SANS Institute e patrocinada pela empresa de serviços de segurança cibernética Bishop Fox, que também descobriu que as fraquezas mais comuns exploradas pelos hackers incluem configurações vulneráveis, falhas de software e serviços da Web expost...

Quem sou eu

Minha foto
Igor Deungaro
Bem Vindo ao Cyber Security Brasil, espero que goste !!!
Ver meu perfil completo

Cyber Security

A Shared Service Account Across Agents Destroys the Investigation

It is worth separating two moments: the day you design the architecture and the day you have to reconstruct what happened. A shared identity is comfortable on the first and devastating on the second. The investigation that never happens Picture the alert: the automation account read 4,200 customer records at 3:12 a.m. and made an external request straight after. The responder's questions are immediate — which agent, triggered by which task, on behalf of which user, reading what content before the decision. With a shared identity, the logs answer none of them. What remains is timestamp correlation across systems that share no identifier, which is guessing with the appearance of method. The entire difference between containing an incident in an hour or in a week is being able to name the actor. The side effect on response There is a second, less obvious harm. Without attribution, the only available containment is shutting everything down. And because shutting everything down...

Marcadores