Skip to content

docs(security): add an authentication and privilege management page - #399

Open
qwer381 wants to merge 1 commit into
IvorySQL:masterfrom
qwer381:docs/security-authentication-privileges
Open

qwer381 wants to merge 1 commit into
IvorySQL:masterfrom
qwer381:docs/security-authentication-privileges

Conversation

@qwer381

@qwer381 qwer381 commented Nov 12, 2026 •

Copy link
Copy Markdown

Closes #394

What changed

New page master/security/authentication_and_privileges.adoc in both languages (+345 lines each), plus two lines per language in nav.adoc to register it as its own top-level block:

* 安全与权限
** xref:master/security/authentication_and_privileges.adoc[安全认证与权限管理]

The block is placed before the FAQ section, i.e. after 参考指南. That position is deliberate: 25 open pull requests currently edit nav.adoc, but all of them insert above line 177 (CN) / 181 (EN), and the security page is a new top-level topic, so it does not belong under any existing section.

What the page covers

  1. Authentication — pg_hba.conf field by field, the six rules a fresh 5.6 install ships (line numbers 117, 119, 121, 124, 125, 126), local/host/hostssl, and why editing the file only needs a reload.
  2. Passwords — password_encryption (md5 | scram-sha-256, default scram-sha-256), what the stored hash looks like, and what happens to existing hashes when the setting changes.
  3. TLS — the ssl* parameters a running 5.6 reports, with the caveat that the set depends on whether the build links OpenSSL (see below).
  4. Roles and privileges — role attributes, GRANT/REVOKE, default privileges and object ownership, and the actual public schema ACL: {pg_database_owner=UC/pg_database_owner,=U/pg_database_owner} — USAGE is granted to PUBLIC, CREATE is not.
  5. Differences in Oracle mode — the mode follows the listener (the same instance answers as pg on 5432 and oracle on 1521), and CREATE USER … IDENTIFIED BY is not accepted by this build: both listeners return ERROR: unrecognized role option "identified".
  6. A troubleshooting checklist for the usual "why can this account connect on one port but not the other" cases.

How it was verified

Everything was read from a freshly initialised initdb -m oracle instance of IvorySQL 5.6 (listeners 5701 / 1701) — the pg_hba_file_rules column order and the six default rules with their line numbers, password_encryption and its enumvals, the pg_database_owner ACL, has_schema_privilege('public','public','CREATE') = false / USAGE = true, and the behaviour of Oracle-style DDL on each listener.

One point is stated as build-dependent rather than absolute: the ssl* parameter set differs between a build that links OpenSSL (16 parameters, ssl_ciphers = HIGH:MEDIUM:+3DES:!aNULL, ssl_groups = X25519:prime256v1, ssl_library = OpenSSL) and one that does not (17 parameters including ssl_sni, with none/empty values). Both were measured here, so the page explains the difference instead of quoting one build's output as universal.

Rendering: asciidoctor.js 4.2.1, zero warnings, CN and EN have identical structure (1 h1 / 6 h2 / 9 h3 / 1 table / 18 literal blocks).

Checklist

  • CLA signed and on file (individual CLA emailed to cla@ivorysql.org on 2026-11-10)
  • nav.adoc change is additive: two lines per language, inserted outside the region touched by the open pull requests
  • Bilingual, identical section structure
  • No deletions anywhere in the patch

master/ has no security/ directory: pg_hba.conf appears in six pages,
password_encryption on one page (three hits, and none on the English side),
GRANT in 23 files, and no single place explains how authentication, password
hashing, TLS and privileges behave in either serving mode.

Add master/security/authentication_and_privileges.adoc (CN + EN) and register
it in both nav.adoc files as its own top-level block, placed before the FAQ
section so it does not compete with the sections currently being edited by
other open pull requests.

The default pg_hba.conf rules and their line numbers, the password_encryption
enum values, the public schema ACL and the two-listener behaviour were all
taken from a freshly initialised IvorySQL 5.6 instance.

Closes IvorySQL#394
@github-actions
github-actions Bot temporarily deployed to pull request November 12, 2026 15:13 Inactive
@github-actions

Copy link
Copy Markdown

🚀 IvorySQL-Docs Preview Ready

@qwer381

qwer381 commented Nov 12, 2026

Copy link
Copy Markdown
Author

Note for reviewers: an identical pull request from the same patch (#400) was opened in the same second by a duplicate automation run. It has been closed, so this is the only thread to review.

@qwer381
qwer381 force-pushed the docs/security-authentication-privileges branch from 65f9f91 to 5aead8d Compare November 13, 2026 05:53
@github-actions
github-actions Bot temporarily deployed to pull request November 13, 2026 05:56 Inactive
@github-actions

Copy link
Copy Markdown

🚀 IvorySQL-Docs Preview Ready

This branch was previously deployed

1 inactive deployment
pull request — 5aead8d2 Deployed Nov 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant