mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Moved the identity OID under NibblePoker's PEN, Added a timeout on what the server sends, Bumped to 0.3.0
- The identity extension's OID is 1.3.6.1.4.1.67681.1.1 (PEN 67681): certificates made with the placeholder aren't read any more, the warning of `bakashrot-cert` is gone. - A packet the server sends (an answer, an attachment's part, to a peer too) has 30 s: a client that stopped reading is dropped. - A peer using up a stream's ids: left as it is, why in known-issues.md. - Version 0.3.0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Generated
+8
-8
@@ -123,7 +123,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-capi"
|
name = "bakashrot-capi"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bakashrot-client",
|
"bakashrot-client",
|
||||||
"bakashrot-config",
|
"bakashrot-config",
|
||||||
@@ -137,7 +137,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-client"
|
name = "bakashrot-client"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
"aws-lc-rs",
|
||||||
"bakashrot-pki",
|
"bakashrot-pki",
|
||||||
@@ -147,7 +147,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-config"
|
name = "bakashrot-config"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bakashrot-proto",
|
"bakashrot-proto",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@@ -157,7 +157,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-pki"
|
name = "bakashrot-pki"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bakashrot-proto",
|
"bakashrot-proto",
|
||||||
"rcgen",
|
"rcgen",
|
||||||
@@ -169,7 +169,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-proto"
|
name = "bakashrot-proto"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
@@ -180,7 +180,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-server"
|
name = "bakashrot-server"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
"aws-lc-rs",
|
||||||
"bakashrot-client",
|
"bakashrot-client",
|
||||||
@@ -200,7 +200,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-storage"
|
name = "bakashrot-storage"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bakashrot-config",
|
"bakashrot-config",
|
||||||
"bakashrot-proto",
|
"bakashrot-proto",
|
||||||
@@ -210,7 +210,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bakashrot-tools"
|
name = "bakashrot-tools"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bakashrot-client",
|
"bakashrot-client",
|
||||||
"bakashrot-config",
|
"bakashrot-config",
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ resolver = "3"
|
|||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.100"
|
rust-version = "1.100"
|
||||||
license = "CC0-1.0"
|
license = "CC0-1.0"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ from dataclasses import dataclass, field
|
|||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from typing import Any, Iterator, Optional, Union
|
from typing import Any, Iterator, Optional, Union
|
||||||
|
|
||||||
__version__ = "0.2.0"
|
__version__ = "0.3.0"
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Client", "Message", "MessagesPage", "NamesList",
|
"Client", "Message", "MessagesPage", "NamesList",
|
||||||
|
|||||||
@@ -23,19 +23,12 @@ pub use revocation::{Revocations, SharedRevocations, serial};
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use x509_parser::certificate::X509Certificate;
|
use x509_parser::certificate::X509Certificate;
|
||||||
|
|
||||||
/// The identity extension's OID.
|
/// The identity extension's OID: `1.3.6.1.4.1.67681.1.1`, under
|
||||||
///
|
/// NibblePoker's Private Enterprise Number (67681, from IANA), BakaShrot's
|
||||||
/// **A placeholder** ([`IDENTITY_OID_IS_PLACEHOLDER`]): under PEN 32473,
|
/// branch (`.1`), its identity extension (`.1`). `docs/oid.md` has the
|
||||||
/// which RFC 5612 reserves for documentation. Replace it with one under
|
/// branches. It never changes: certificates made with another one aren't
|
||||||
/// NibblePoker's own PEN once IANA gave it (`docs/oid.md`), before
|
/// read (those of 0.2.0 and before had a placeholder).
|
||||||
/// issuing certificates for real: certificates made with this one stop
|
pub const IDENTITY_OID: &[u64] = &[1, 3, 6, 1, 4, 1, 67681, 1, 1];
|
||||||
/// being read once it changes.
|
|
||||||
pub const IDENTITY_OID: &[u64] = &[1, 3, 6, 1, 4, 1, 32473, 1, 1];
|
|
||||||
|
|
||||||
/// Whether [`IDENTITY_OID`] is still the placeholder: `bakashrot-cert`
|
|
||||||
/// warns when it makes a CA or a certificate then. Set it to `false` with
|
|
||||||
/// the real OID.
|
|
||||||
pub const IDENTITY_OID_IS_PLACEHOLDER: bool = true;
|
|
||||||
|
|
||||||
/// The DNS name every server certificate has, and every client asks for:
|
/// The DNS name every server certificate has, and every client asks for:
|
||||||
/// a label, not a host. Servers are known by their certificate, wherever
|
/// a label, not a host. Servers are known by their certificate, wherever
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ const IDLE_TIMEOUT: Duration = Duration::from_secs(300);
|
|||||||
/// How long an attachment's next part may take to come.
|
/// How long an attachment's next part may take to come.
|
||||||
const PART_TIMEOUT: Duration = Duration::from_secs(30);
|
const PART_TIMEOUT: Duration = Duration::from_secs(30);
|
||||||
|
|
||||||
|
/// How long a packet may take to be sent (an attachment's part is 1 MiB):
|
||||||
|
/// a client that stopped reading is dropped rather than waited for.
|
||||||
|
pub(crate) const SEND_TIMEOUT: Duration = Duration::from_secs(30);
|
||||||
|
|
||||||
/// An upload's parts given to the writer and not written yet, at most: the
|
/// An upload's parts given to the writer and not written yet, at most: the
|
||||||
/// next ones wait (the client with them, through TCP).
|
/// next ones wait (the client with them, through TCP).
|
||||||
const PARTS_IN_FLIGHT: usize = 4;
|
const PARTS_IN_FLIGHT: usize = 4;
|
||||||
@@ -535,6 +539,18 @@ pub(crate) fn refused(code: ErrorCode, reason: String) -> Packet {
|
|||||||
RequestRefused::new(code, reason).into()
|
RequestRefused::new(code, reason).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sends a packet, within [`SEND_TIMEOUT`]: an error closes the connection.
|
||||||
pub(crate) async fn send(frames: &mut Frames, packet: Packet) -> std::io::Result<()> {
|
pub(crate) async fn send(frames: &mut Frames, packet: Packet) -> std::io::Result<()> {
|
||||||
frames.send(bytes::Bytes::from(packet.encode())).await
|
match timeout(
|
||||||
|
SEND_TIMEOUT,
|
||||||
|
frames.send(bytes::Bytes::from(packet.encode())),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Ok(sent) => sent,
|
||||||
|
Err(_) => Err(std::io::Error::new(
|
||||||
|
std::io::ErrorKind::TimedOut,
|
||||||
|
"too slow to take an answer",
|
||||||
|
)),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//! `send_*` allow. `accept_from.rs` is the other end.
|
//! `send_*` allow. `accept_from.rs` is the other end.
|
||||||
|
|
||||||
use crate::Shared;
|
use crate::Shared;
|
||||||
|
use crate::connection::SEND_TIMEOUT;
|
||||||
use crate::writer::Write;
|
use crate::writer::Write;
|
||||||
use bakashrot_config::Permissions;
|
use bakashrot_config::Permissions;
|
||||||
use bakashrot_pki::tls;
|
use bakashrot_pki::tls;
|
||||||
@@ -297,10 +298,11 @@ impl Link {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn send(&mut self, packet: Packet) -> Result<(), String> {
|
async fn send(&mut self, packet: Packet) -> Result<(), String> {
|
||||||
self.frames
|
let sending = self.frames.send(bytes::Bytes::from(packet.encode()));
|
||||||
.send(bytes::Bytes::from(packet.encode()))
|
match timeout(SEND_TIMEOUT, sending).await {
|
||||||
.await
|
Ok(sent) => sent.map_err(|error| error.to_string()),
|
||||||
.map_err(|error| error.to_string())
|
Err(_) => Err("too slow to take a packet".into()),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn receive(&mut self) -> Result<Packet, String> {
|
async fn receive(&mut self) -> Result<Packet, String> {
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
//! them. Every file is PEM; keys are written once, never over an existing
|
//! them. Every file is PEM; keys are written once, never over an existing
|
||||||
//! file. See `docs/certificates.md`.
|
//! file. See `docs/certificates.md`.
|
||||||
|
|
||||||
use bakashrot_pki::{
|
use bakashrot_pki::{CA_DAYS, CERTIFICATE_DAYS, Ca, Identity, Revocations, Usage, summarize};
|
||||||
CA_DAYS, CERTIFICATE_DAYS, Ca, IDENTITY_OID_IS_PLACEHOLDER, Identity, Revocations, Usage,
|
|
||||||
summarize,
|
|
||||||
};
|
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
@@ -98,15 +95,7 @@ fn main() -> ExitCode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Said whenever a certificate is made while the OID is the placeholder.
|
|
||||||
const PLACEHOLDER_WARNING: &str = "warning: the identity extension's OID is still a placeholder \
|
|
||||||
(docs/oid.md): fine for tests, not for certificates in use";
|
|
||||||
|
|
||||||
fn run(command: Command) -> Result<(), String> {
|
fn run(command: Command) -> Result<(), String> {
|
||||||
if IDENTITY_OID_IS_PLACEHOLDER && matches!(command, Command::Ca { .. } | Command::Issue { .. })
|
|
||||||
{
|
|
||||||
eprintln!("{PLACEHOLDER_WARNING}");
|
|
||||||
}
|
|
||||||
match command {
|
match command {
|
||||||
Command::Ca { name, days, out } => {
|
Command::Ca { name, days, out } => {
|
||||||
let ca = Ca::create(&name, days).map_err(|e| e.to_string())?;
|
let ca = Ca::create(&name, days).map_err(|e| e.to_string())?;
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ fn a_ca_issues_and_revokes() {
|
|||||||
let folder = folder("cert-tool");
|
let folder = folder("cert-tool");
|
||||||
let (ok, text) = cert(&folder, &["ca", "--name", "Test CA"]);
|
let (ok, text) = cert(&folder, &["ca", "--name", "Test CA"]);
|
||||||
assert!(ok, "{text}");
|
assert!(ok, "{text}");
|
||||||
if bakashrot_pki::IDENTITY_OID_IS_PLACEHOLDER {
|
|
||||||
assert!(text.contains("OID is still a placeholder"), "{text}");
|
|
||||||
}
|
|
||||||
assert!(
|
assert!(
|
||||||
cert(
|
cert(
|
||||||
&folder,
|
&folder,
|
||||||
|
|||||||
@@ -28,10 +28,9 @@ is a CRL file from the CA, pushed to the servers.
|
|||||||
Names and roles follow the name rules (1-64 of `A-Z a-z 0-9 _ . -`, not
|
Names and roles follow the name rules (1-64 of `A-Z a-z 0-9 _ . -`, not
|
||||||
only digits), 64 roles at most. Roles mean nothing to the certificates:
|
only digits), 64 roles at most. Roles mean nothing to the certificates:
|
||||||
the server's config says what each may do.
|
the server's config says what each may do.
|
||||||
- **Its OID is a placeholder** (`IDENTITY_OID`, `1.3.6.1.4.1.32473.1.1`,
|
- **Its OID is `1.3.6.1.4.1.67681.1.1`** (`IDENTITY_OID`), under
|
||||||
under the PEN RFC 5612 reserves for documentation; `bakashrot-cert`
|
NibblePoker's own PEN (67681), since 0.3.0. Certificates made before
|
||||||
warns while it is): it goes under NibblePoker's own PEN before
|
(a placeholder OID) aren't read: issue them again. The branches:
|
||||||
certificates are issued for real. Why, how to request it, what to change:
|
|
||||||
`oid.md`.
|
`oid.md`.
|
||||||
- **The CN is the name too**, for people (`openssl x509 -text`, logs). Only
|
- **The CN is the name too**, for people (`openssl x509 -text`, logs). Only
|
||||||
the extension is trusted.
|
the extension is trusted.
|
||||||
@@ -132,4 +131,3 @@ Unix. `revoke` only takes certificates the CA issued.
|
|||||||
- **`AllowedServerNames`** in a client's config and for the peers a
|
- **`AllowedServerNames`** in a client's config and for the peers a
|
||||||
server dials: the server names it accepts (any of the CA's servers
|
server dials: the server names it accepts (any of the CA's servers
|
||||||
without it).
|
without it).
|
||||||
- NibblePoker's PEN, replacing the placeholder OID (`oid.md`).
|
|
||||||
|
|||||||
@@ -55,12 +55,6 @@ network**, not exposed to the internet. So:
|
|||||||
From a read of the source on 2026-11-15: no test shows any of these yet.
|
From a read of the source on 2026-11-15: no test shows any of these yet.
|
||||||
Reproduce one before fixing it, and move it up (or drop it) once known.
|
Reproduce one before fixing it, and move it up (or drop it) once known.
|
||||||
|
|
||||||
- **The server's writes have no timeout.** The 5 min of silence only
|
|
||||||
covers reads (`connection.rs`, `serve`): a client that stops reading
|
|
||||||
in the middle of an answer (an attachment's parts, `get_attachment`)
|
|
||||||
holds its task and its read connection's turn for as long as TCP
|
|
||||||
keeps the connection. Fix: a timeout around `send`, as `PART_TIMEOUT`
|
|
||||||
does for reads.
|
|
||||||
- **`sync_interval` over 5 min.** The server dialed closes the idle link
|
- **`sync_interval` over 5 min.** The server dialed closes the idle link
|
||||||
(`IDLE_TIMEOUT`), so every check-in fails once ("closed the link",
|
(`IDLE_TIMEOUT`), so every check-in fails once ("closed the link",
|
||||||
warned), then the link is dialed again after `retry_delay`. Nothing
|
warned), then the link is dialed again after `retry_delay`. Nothing
|
||||||
@@ -106,8 +100,12 @@ Reproduce one before fixing it, and move it up (or drop it) once known.
|
|||||||
refused ("no message id left", `insert_pushed`); it replicates on to
|
refused ("no message id left", `insert_pushed`); it replicates on to
|
||||||
the other servers. Nothing lowers a last id again. Part of "Peers
|
the other servers. Nothing lowers a last id again. Part of "Peers
|
||||||
are trusted" above, but one message is enough and a bug can do it.
|
are trusted" above, but one message is enough and a bug can do it.
|
||||||
Fix: refuse a batch that doesn't follow the last id here (also closes
|
Left as it is (the owner, 2026-11-16): no cheap check tells a bad id
|
||||||
the gaps), or one that jumps further than some bound.
|
from a real one. Ids jump for good reasons (retention, a server that
|
||||||
|
joins late), so "must follow the last id here" or a bound on the jump
|
||||||
|
refuses real messages or stops nothing; refusing ids past its own
|
||||||
|
for the nodes that push here breaks a node moving to another server
|
||||||
|
and back. Fix: messages signed by their node, as above.
|
||||||
- **A pair refused for good is sent again at every check-in**, a whole
|
- **A pair refused for good is sent again at every check-in**, a whole
|
||||||
batch each time (`push_to.rs`, `send_messages`: a refusal only
|
batch each time (`push_to.rs`, `send_messages`: a refusal only
|
||||||
leaves it for the next check-in): the database's topic and node
|
leaves it for the next check-in): the database's topic and node
|
||||||
|
|||||||
+3
-4
@@ -6,9 +6,8 @@ machine, 2026-11-15, Windows): the outputs shown are what came back.
|
|||||||
|
|
||||||
Get a release (CI's artifacts, or `release.ps1` / `python release.py`):
|
Get a release (CI's artifacts, or `release.ps1` / `python release.py`):
|
||||||
the programs, `bakashrot.dll` / `libbakashrot.so`, the wheel, the
|
the programs, `bakashrot.dll` / `libbakashrot.so`, the wheel, the
|
||||||
example configs. The certificates are throwaway for now: the identity
|
example configs. Certificates made before 0.3.0 had a placeholder
|
||||||
OID is a placeholder until NibblePoker's PEN (`oid.md`), every tool run
|
identity OID (`oid.md`) and aren't read any more: issue them again.
|
||||||
says so. Reissue them all once it changes.
|
|
||||||
|
|
||||||
| Machine | What runs there | Files it gets |
|
| Machine | What runs there | Files it gets |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
@@ -165,7 +164,7 @@ certificate is refused, at its next connection or request:
|
|||||||
Failed to connect to server-2.lab:7000 (AuthRejected): the server refused this client's certificate (CertificateRevoked)
|
Failed to connect to server-2.lab:7000 (AuthRejected): the server refused this client's certificate (CertificateRevoked)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Python.** `pip install bakashrot-0.2.0-py3-none-<platform>.whl` (from the
|
**Python.** `pip install bakashrot-0.3.0-py3-none-<platform>.whl` (from the
|
||||||
release's `python/`), then, next to lab-py's `client.toml` (it may push and
|
release's `python/`), then, next to lab-py's `client.toml` (it may push and
|
||||||
read: `sensor` and `dashboard`):
|
read: `sensor` and `dashboard`):
|
||||||
|
|
||||||
|
|||||||
+34
-63
@@ -1,77 +1,48 @@
|
|||||||
# The identity extension's OID
|
# The identity extension's OID
|
||||||
|
|
||||||
**Open point:** the OID is a placeholder until NibblePoker has its own
|
`IDENTITY_OID = 1.3.6.1.4.1.67681.1.1` (`crates/bakashrot-pki/src/lib.rs`),
|
||||||
Private Enterprise Number (PEN) from IANA. The owner's to request
|
since 0.3.0 (2026-11-16).
|
||||||
(below), then a few lines to change here.
|
|
||||||
|
|
||||||
## Why it matters
|
## The branches
|
||||||
|
|
||||||
|
NibblePoker's Private Enterprise Number (PEN) is **67681**, from IANA
|
||||||
|
(in the registry, <https://www.iana.org/assignments/enterprise-numbers/>,
|
||||||
|
checked 2026-11-16). One number for NibblePoker as a whole: every project
|
||||||
|
gets its own branch under it, recorded here. A number once given is never
|
||||||
|
reused.
|
||||||
|
|
||||||
|
| OID | What |
|
||||||
|
|---|---|
|
||||||
|
| `1.3.6.1.4.1.67681` | NibblePoker |
|
||||||
|
| `1.3.6.1.4.1.67681.1` | BakaShrot |
|
||||||
|
| `1.3.6.1.4.1.67681.1.1` | BakaShrot's identity extension |
|
||||||
|
|
||||||
|
## Why it never changes
|
||||||
|
|
||||||
Servers find a certificate's name and roles by its identity extension's
|
Servers find a certificate's name and roles by its identity extension's
|
||||||
OID (`bakashrot_pki::IDENTITY_OID`). Changing the OID makes every
|
OID. Changing the OID makes every certificate issued before unreadable as
|
||||||
certificate issued before unreadable as a BakaShrot identity: all of them
|
a BakaShrot identity: all of them would have to be issued again. What's
|
||||||
would have to be issued again. So it's settled before certificates are in
|
inside the extension can still change (its `version` field) without
|
||||||
use; what's inside the extension can still change (its `version` field)
|
touching the OID.
|
||||||
without touching the OID.
|
|
||||||
|
|
||||||
Within a deployment, only the CA's certificates are read, so another
|
Within a deployment, only the CA's certificates are read, so another
|
||||||
extension using the same OID somewhere else can't confuse a server. The OID
|
extension using the same OID somewhere else can't confuse a server. The OID
|
||||||
mostly needs to be stable, and properly ours.
|
mostly needs to be stable, and properly ours.
|
||||||
|
|
||||||
## Now: a placeholder
|
## Before 0.3.0: a placeholder
|
||||||
|
|
||||||
- `IDENTITY_OID = 1.3.6.1.4.1.32473.1.1`: under PEN 32473, "Example
|
Up to 0.2.0 the OID was `1.3.6.1.4.1.32473.1.1`, under PEN 32473, "Example
|
||||||
Enterprise Number for Documentation Use" (RFC 5612). It works, but isn't
|
Enterprise Number for Documentation Use" (RFC 5612), and `bakashrot-cert`
|
||||||
meant for real use, and examples elsewhere use it too.
|
warned whenever it made a certificate. **Those certificates aren't read
|
||||||
- `IDENTITY_OID_IS_PLACEHOLDER = true`: `bakashrot-cert` warns whenever it
|
any more** ("no BakaShrot identity"): make the CA's again or keep it (a
|
||||||
makes a CA or issues a certificate.
|
CA has no identity extension), issue every server's and node's again.
|
||||||
- Fine for development and tests; not for certificates in use.
|
|
||||||
- `OldSource/`'s UUID arc (`2.25.2320...0981`) can't be used: `rcgen`
|
`OldSource/`'s UUID arc (`2.25.2320...0981`) couldn't be used: `rcgen`
|
||||||
writes OID parts of 64 bits at most, a UUID is 128.
|
writes OID parts of 64 bits at most, a UUID is 128.
|
||||||
|
|
||||||
## Requesting a PEN
|
## Changing the registration
|
||||||
|
|
||||||
From IANA's application page (checked 2026-11-13):
|
The registry lists the organization, the contact's name and the contact's
|
||||||
|
email address. Changes (a new contact, an address) are asked for at
|
||||||
1. **Check first** that NibblePoker doesn't have one: search the registry,
|
<https://pen.iana.org/pen/PenApplication.page> or iana-pen@iana.org, by
|
||||||
<https://www.iana.org/assignments/enterprise-numbers/> (it had none on
|
the contact.
|
||||||
2026-11-13). An organization that has one hands out sub-numbers under
|
|
||||||
it instead of asking for another.
|
|
||||||
2. **Apply** at <https://pen.iana.org/pen/PenApplication.page>. It's free.
|
|
||||||
It asks for:
|
|
||||||
- the **assignee**, the organization (or person) the number is for:
|
|
||||||
name ("NibblePoker"), address, country, phone (optional);
|
|
||||||
- a **contact**, the person IANA and others write to with questions,
|
|
||||||
who may also request changes later: name, address, country, phone and
|
|
||||||
fax (optional), **email** (required).
|
|
||||||
3. **Confirm** the request from the email IANA sends to that address.
|
|
||||||
4. **Wait:** if nothing else is needed, the number comes within seven days
|
|
||||||
of that confirmation. Questions: iana-pen@iana.org.
|
|
||||||
|
|
||||||
**What's public:** the registry lists, for every number, the organization,
|
|
||||||
the contact's name and the contact's email address (written with `&` for
|
|
||||||
`@`). Use an address meant to be published (a role address, not a
|
|
||||||
personal one).
|
|
||||||
|
|
||||||
Ask for one number for NibblePoker as a whole, not one per project: every
|
|
||||||
project gets its own branch under it.
|
|
||||||
|
|
||||||
## Once the number is there
|
|
||||||
|
|
||||||
With `<PEN>` the number IANA gave:
|
|
||||||
|
|
||||||
1. **Plan the branches**, and record them in the table below; a number
|
|
||||||
once given is never reused:
|
|
||||||
|
|
||||||
| OID | What |
|
|
||||||
|---|---|
|
|
||||||
| `1.3.6.1.4.1.<PEN>` | NibblePoker |
|
|
||||||
| `1.3.6.1.4.1.<PEN>.1` | BakaShrot |
|
|
||||||
| `1.3.6.1.4.1.<PEN>.1.1` | BakaShrot's identity extension |
|
|
||||||
|
|
||||||
2. **In `crates/bakashrot-pki/src/lib.rs`:** `IDENTITY_OID` to
|
|
||||||
`[1, 3, 6, 1, 4, 1, <PEN>, 1, 1]`, `IDENTITY_OID_IS_PLACEHOLDER` to
|
|
||||||
`false`.
|
|
||||||
3. **Update** this file (the table, "Now"), `certificates.md` and the open
|
|
||||||
point in `../revamp.md`.
|
|
||||||
4. **Issue again** any certificate made with the placeholder, and run
|
|
||||||
`test.ps1` (the tests issue their own, nothing to change there).
|
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ the same ids with different messages, undetected.
|
|||||||
|---|---|
|
|---|---|
|
||||||
| TLS, versions, welcome | 10 s (the server); the client's connect too |
|
| TLS, versions, welcome | 10 s (the server); the client's connect too |
|
||||||
| Silence between requests | 5 min, then the server closes |
|
| Silence between requests | 5 min, then the server closes |
|
||||||
|
| A packet sent (an answer, an attachment's part, to a peer too) | 30 s (the server), then it closes: a client that stopped reading doesn't hold a connection |
|
||||||
| An answer | 30 s (the client) |
|
| An answer | 30 s (the client) |
|
||||||
| An attachment's next part | 30 s (the server), then it closes |
|
| An attachment's next part | 30 s (the server), then it closes |
|
||||||
|
|
||||||
|
|||||||
@@ -107,9 +107,11 @@ Also decided (2026-11-13):
|
|||||||
critical ones it doesn't know): `SEQUENCE { version INTEGER (1), name
|
critical ones it doesn't know): `SEQUENCE { version INTEGER (1), name
|
||||||
UTF8String, roles SEQUENCE OF UTF8String }`. The name is the node;
|
UTF8String, roles SEQUENCE OF UTF8String }`. The name is the node;
|
||||||
roles are free strings with the name rules, their meaning in the
|
roles are free strings with the name rules, their meaning in the
|
||||||
server's config. Only the server reads it. Its OID is a placeholder
|
server's config. Only the server reads it. Its OID is
|
||||||
for now, see "Open questions" (the UUID arc of `OldSource/` can't be
|
`1.3.6.1.4.1.67681.1.1`, under NibblePoker's PEN (2026-11-16,
|
||||||
used: `rcgen` writes OID parts of 64 bits at most);
|
`docs/oid.md`; a placeholder until then; the UUID arc of
|
||||||
|
`OldSource/` can't be used: `rcgen` writes OID parts of 64 bits at
|
||||||
|
most);
|
||||||
- the name again as the subject's CN, for people (`openssl x509 -text`,
|
- the name again as the subject's CN, for people (`openssl x509 -text`,
|
||||||
logs); the server only trusts the extension;
|
logs); the server only trusts the extension;
|
||||||
- extended key usage `clientAuth` for clients, `serverAuth` and
|
- extended key usage `clientAuth` for clients, `serverAuth` and
|
||||||
@@ -262,7 +264,9 @@ Also decided (2026-11-13):
|
|||||||
programs, the client library and its bindings, the example configs,
|
programs, the client library and its bindings, the example configs,
|
||||||
the docs, the licenses, and a smoke test;
|
the docs, the licenses, and a smoke test;
|
||||||
- **the Python wheel has the library in it**, for a simple install;
|
- **the Python wheel has the library in it**, for a simple install;
|
||||||
- **version 0.2.0.**
|
- **version 0.2.0**; **0.3.0** on 2026-11-16 (the identity OID under
|
||||||
|
NibblePoker's PEN, the roles as the only lists of topics,
|
||||||
|
`list_topics` / `list_nodes`).
|
||||||
- **The PureBasic version removed** (2026-11-15): `OldSource/` deleted,
|
- **The PureBasic version removed** (2026-11-15): `OldSource/` deleted,
|
||||||
kept in git history (up to `68966a8`). What of its notes and designs
|
kept in git history (up to `68966a8`). What of its notes and designs
|
||||||
still holds went to `docs/known-issues.md`; the rest was already
|
still holds went to `docs/known-issues.md`; the rest was already
|
||||||
@@ -305,14 +309,6 @@ come back as text either way; only what SQL computes would gain
|
|||||||
|
|
||||||
- **A handle-based DLL API** (several connections per process, old open item
|
- **A handle-based DLL API** (several connections per process, old open item
|
||||||
10): later maybe, the owner's call (one connection per process for now).
|
10): later maybe, the owner's call (one connection per process for now).
|
||||||
- **The identity extension's OID, a placeholder for now:** it goes under a
|
|
||||||
Private Enterprise Number of NibblePoker's, from IANA (free, within a
|
|
||||||
week; the owner's to request). Until then `bakashrot_pki::IDENTITY_OID`
|
|
||||||
is under RFC 5612's documentation PEN (32473),
|
|
||||||
`IDENTITY_OID_IS_PLACEHOLDER` is `true` and `bakashrot-cert` warns when
|
|
||||||
it makes a certificate. Certificates issued with it stop being read once
|
|
||||||
it changes: get the number before any is in use. How to request it and
|
|
||||||
what to change then: `docs/oid.md`.
|
|
||||||
|
|
||||||
## Kept: the behaviour to carry over
|
## Kept: the behaviour to carry over
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user