Clarify the importance of NOINHERIT to properly create a role on the DOCS
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Documentação
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- postgresql
- Domínio
- documentation, security
Direção de pesquisa
Comece revisando a documentação de PostgreSQL GRANT vinculada na issue e localize a orientação correspondente sobre criação de roles neste repositório. Esclareça o comportamento de NOINHERIT, a persistência das roles e o exemplo separado de ALTER ROLE; considera-se concluído quando a documentação explicar com precisão o risco de autorização e evitar sugerir que um CREATE ROLE posterior altera uma role existente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
When a ROLE is created in PG, it may inherit privileges from other roles. It specially inherits all privileges from the PUBLIC role.
From the DOCs:
"Any particular role will have the sum of privileges granted directly to it, privileges granted to any role it is presently a member of, and privileges granted to PUBLIC.".
If your application is implementing a whitelist logic (most of the cases), this may represent a leak of authorization. So all roles must be created using the NOINHERIT clause, but there is another gotcha: creating a role and them altering it to NOINHERIT is a safer option than creating a role with NOINHERIT.
-- OK if there is no graphile_visitor already in your system
CREATE ROLE graphile_visitor NOINHERIT;
-- A better option, specially during development if you use dropdb to "reset" your application
CREATE ROLE graphile_visitor;
ALTER ROLE graphile_visitor NOINHERIT;
When a ROLE is created, it's not stored into the database itself, but inside a private catalog called pg_user. If graphile_visitor by accident was crate without the NOINHERIT, dropping the database won't erase it, so adding the NOINHERIT to its creation clause afterward will have no effect at all.
-- this is a mistake
CREATE ROLE graphile_visitor;
-- this isn't a bug fix
CREATE ROLE graphile_visitor NOINHERIT;
This happens because, when it runs the second query, PG will identify that a role with the same name already exists so it will skip the CREATE ROLE. Keeping creation and alteration separated will ensure the intended behavior.
- Linguagem predominante
- SCSS
- Estrelas
- 27
- Forks
- 124
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de graphile/graphile.github.io
-
help wanted quick
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 38/100
graphile/graphile.github.io#401 · 1 comentário · 1 reação ·
-
website: Update details on homepage and sponsor pageTalvez livre de novo @jemgillam assumiu há 1119 dias e não há nenhum pull request aberto. Abertaquick
graphile/graphile.github.io#399 · 4 comentários · 1 responsável ·
-
sponsor page: New wording around Grafast needed!Talvez livre de novo @jemgillam assumiu há 1149 dias e não há nenhum pull request aberto. Aberta
graphile/graphile.github.io#393 · 1 reação · 1 responsável ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 38/100
graphile/graphile.github.io#341 · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
graphile/graphile.github.io#280 · 2 comentários · 5 reações ·
Todas as issues de graphile/graphile.github.io
Issues semelhantes
-
agent/scanner bug stage/010-actionable
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
torch-spyre/spyre-inference#1812 ·
Mantenedores costumam responder em até 1 dia
-
sync-en
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
[oblt-aw][autodoc] Update autodoc routing docs for relative in-repo lock usesTalvez já em andamento @github-actions assumiu hoje. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
[Enhancement] platform-engineer: a definition change does not re-render running Applications; say how to roll it outTalvez já em andamento @anoop2811 assumiu hoje. Abertaneeds-triage type/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
cloudflare/workers-sdk#17189 ·
Mantenedores costumam responder em até 1 dia