Skip to content

Commit bf548a2

Browse files
committed
style: replace em dashes with standard punctuation throughout
Replaces all em dashes with context-appropriate alternatives: colons and semicolons in code comments, hyphens in prose and chart descriptions, pipes in HTML page titles, and commas in handler doc comments.
1 parent b7cac99 commit bf548a2

18 files changed

Lines changed: 39 additions & 39 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# PINT Pouring IPA for Network Trust
1+
# PINT - Pouring IPA for Network Trust
22

33
PINT is a self-service web portal for [Computer Science House](https://csh.rit.edu) that migrates WiFi authentication from EAP-MSCHAPv2 (password-based) to EAP-TLS (certificate-based). Members log in with their CSH Keycloak account and receive a certificate-backed WiFi profile that works on iOS, macOS, and Android. Home router operators can also provision a RADIUS shared secret and download a RadSec client certificate for internet-facing [RFC 6614](https://www.rfc-editor.org/rfc/rfc6614) connectivity.
44

55
## What it does
66

77
| Feature | How |
88
|---|---|
9-
| **iOS / macOS WiFi profile** | Generates an Apple mobileconfig (`.mobileconfig`) containing a FreeIPA-issued EAP-TLS client certificate, the WiFi CA, and 802.1X config. Install it and connect no password needed. |
9+
| **iOS / macOS WiFi profile** | Generates an Apple mobileconfig (`.mobileconfig`) containing a FreeIPA-issued EAP-TLS client certificate, the WiFi CA, and 802.1X config. Install it and connect - no password needed. |
1010
| **Android WiFi profile** | Generates a PKCS#12 (`.p12`) bundle with the same certificate for import into Android's WiFi settings. |
1111
| **Home router (RadSec)** | Members can register a RADIUS shared secret and download a RadSec client certificate (`.p12`) to configure a home router for [RFC 6614 RADIUS over TLS](https://www.rfc-editor.org/rfc/rfc6614) on port 2083. |
1212
| **CA distribution** | One-tap download of the WiFi CA and RadSec CA certificates for manual trust store installation. |
@@ -91,7 +91,7 @@ The repo includes a FreeIPA stub server that generates a real CA at startup and
9191
```bash
9292
# 1. Copy and edit the dev env file
9393
cp .env.dev.example .env.dev
94-
# (edit .env.dev the stub defaults work as-is for IPA fields)
94+
# (edit .env.dev - the stub defaults work as-is for IPA fields)
9595

9696
# 2. Build and start everything
9797
make dev

chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: pint
3-
description: Pouring IPA for Network Trust CSH WiFi EAP-TLS enrollment and home RadSec management
3+
description: Pouring IPA for Network Trust - CSH WiFi EAP-TLS enrollment and home RadSec management
44
type: application
55
version: 0.1.0
66
appVersion: "0.1.0"

chart/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ app.kubernetes.io/name={{ include "pint.freeradiusFullname" . }},app.kubernetes.
6767
{{- end }}
6868

6969
{{/*
70-
Container image references tag falls back to Chart.appVersion.
70+
Container image references: tag falls back to Chart.appVersion.
7171
*/}}
7272
{{- define "pint.image" -}}
7373
{{ .Values.pint.image.repository }}:{{ default .Chart.AppVersion .Values.pint.image.tag }}

chart/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ envSecret: pint-env
2727

2828
# Names of the K8s Secrets PINT creates and manages at runtime.
2929
# These are referenced consistently across the Role, PINT env vars, and
30-
# FreeRADIUS volume mounts change all three if you rename them.
30+
# FreeRADIUS volume mounts - change all three if you rename them.
3131
secrets:
3232
radiusClients: pint-radius-clients
3333
radiusConfig: pint-radius-config
@@ -37,7 +37,7 @@ service:
3737
type: ClusterIP
3838
port: 80
3939

40-
# FreeRADIUS RadSec server mounted by home routers.
40+
# FreeRADIUS: RadSec server mounted by home routers.
4141
freeradius:
4242
enabled: true
4343
image:

cmd/pint/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ func main() {
3232
log.Fatalf("config: %v", err)
3333
}
3434

35-
// FreeIPA client authenticate at startup
35+
// FreeIPA client: authenticate at startup
3636
ipaClient := freeipa.New(cfg.IPAHost, cfg.IPAPrincipal, cfg.IPAPassword, cfg.IPASkipTLSVerify)
3737
if err := ipaClient.Login(); err != nil {
3838
log.Fatalf("freeipa login: %v", err)
3939
}
4040

41-
// Kubernetes client try in-cluster first, fall back to kubeconfig
41+
// Kubernetes client: try in-cluster first, fall back to kubeconfig
4242
restCfg, err := rest.InClusterConfig()
4343
if err != nil {
4444
restCfg, err = clientcmd.BuildConfigFromFlags("", clientcmd.RecommendedHomeFile)

dev/freeipa-stub/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func main() {
7676

7777
// loadOrInitCAs loads persisted CA state from dir, or generates a fresh root +
7878
// two intermediates and persists them. The wifiCAName and radSecCAName are the
79-
// FreeIPA CA names PINT will use they must match PINT_IPA_CA_NAME and
79+
// FreeIPA CA names PINT will use; they must match PINT_IPA_CA_NAME and
8080
// PINT_IPA_RADSEC_CA_NAME in .env.dev.
8181
func loadOrInitCAs(dir, wifiCAName, radSecCAName, rootCAName string) (map[string]*caEntry, error) {
8282
root, err := loadOrCreateCA(dir, "root", "PINT Dev Root CA", nil)
@@ -281,7 +281,7 @@ func handleRPC(w http.ResponseWriter, r *http.Request) {
281281
}))
282282

283283
case "cert_revoke":
284-
log.Printf("cert_revoke: stub no-op")
284+
log.Printf("cert_revoke: stub, no-op")
285285
json.NewEncoder(w).Encode(rpcOK(map[string]interface{}{"result": true}))
286286

287287
default:

internal/config/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ type Config struct {
1919
IPAServiceAccount string
2020
IPAPassword string
2121
IPACAName string
22-
RadSecCAName string // PINT_IPA_RADSEC_CA_NAMEFreeIPA intermediate CA for RadSec certs
23-
RootCAName string // PINT_IPA_ROOT_CA_NAMEsigning root CA; defaults to "ipa"
24-
IPACertProfile string // PINT_IPA_CERT_PROFILEFreeIPA profile for WiFi client certs (optional)
25-
RadSecClientCertProfile string // PINT_IPA_RADSEC_CLIENT_CERT_PROFILEFreeIPA profile for RadSec router client certs (optional)
26-
RadSecServerCertProfile string // PINT_IPA_RADSEC_SERVER_CERT_PROFILEFreeIPA profile for FreeRADIUS server cert (optional)
22+
RadSecCAName string // PINT_IPA_RADSEC_CA_NAME:FreeIPA intermediate CA for RadSec certs
23+
RootCAName string // PINT_IPA_ROOT_CA_NAME:signing root CA; defaults to "ipa"
24+
IPACertProfile string // PINT_IPA_CERT_PROFILE:FreeIPA profile for WiFi client certs (optional)
25+
RadSecClientCertProfile string // PINT_IPA_RADSEC_CLIENT_CERT_PROFILE:FreeIPA profile for RadSec router client certs (optional)
26+
RadSecServerCertProfile string // PINT_IPA_RADSEC_SERVER_CERT_PROFILE:FreeIPA profile for FreeRADIUS server cert (optional)
2727
IPAPrincipal string // derived: full principal, e.g. pint/host@REALM
2828
IPAServiceHostname string // derived: hostname portion of principal, e.g. host
2929
IPASkipTLSVerify bool
@@ -35,7 +35,7 @@ type Config struct {
3535
Namespace string
3636
RadiusClientsSecret string
3737
RadiusConfigSecret string
38-
RadSecCertSecret string // PINT_RADSEC_CERT_SECRETK8s Secret storing FreeRADIUS TLS cert+key
38+
RadSecCertSecret string // PINT_RADSEC_CERT_SECRET:K8s Secret storing FreeRADIUS TLS cert+key
3939
FreeRADIUSPodSelector string
4040

4141
// UI

internal/handlers/csrf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func CSRFMiddleware() gin.HandlerFunc {
2727
}
2828
// Refresh cookie on every response (SameSite=Lax, not HttpOnly so JS
2929
// can read it if needed, but Secure is intentionally omitted here to
30-
// work in local dev over HTTP set Secure=true behind TLS in prod).
30+
// work in local dev over HTTP; set Secure=true behind TLS in prod).
3131
c.SetCookie(csrfCookieName, token, 0, "/", "", false, false)
3232
c.Set(csrfContextKey, token)
3333

@@ -48,6 +48,6 @@ func CSRFMiddleware() gin.HandlerFunc {
4848

4949
func newCSRFToken() string {
5050
b := make([]byte, 16)
51-
rand.Read(b) //nolint:errcheck rand.Read never returns an error
51+
rand.Read(b) //nolint:errcheck -- rand.Read never returns an error
5252
return hex.EncodeToString(b)
5353
}

internal/handlers/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func GenerateProfileHandler(ipaClient *freeipa.Client, cfg *config.Config, caDER
8080
}
8181
}
8282

83-
// CAHandler serves GET /profile/ca returns the FreeIPA CA certificate as DER.
83+
// CAHandler serves GET /profile/ca, returns the FreeIPA CA certificate as DER.
8484
func CAHandler(caDER []byte) gin.HandlerFunc {
8585
return func(c *gin.Context) {
8686
c.Header("Content-Disposition", `attachment; filename="csh-ca.cer"`)

internal/handlers/radius.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func RadiusPageHandler(cfg *config.Config, k8s kubernetes.Interface, caChainPEM
4141
}
4242
}
4343

44-
// SaveSecretHandler serves POST /radius/secret initial enrollment.
44+
// SaveSecretHandler serves POST /radius/secret (initial enrollment).
4545
// Renders the page directly with the one-time key and cert PEM.
4646
func SaveSecretHandler(ipaClient *freeipa.Client, cfg *config.Config, k8s kubernetes.Interface, restCfg *rest.Config, caChainPEM string) gin.HandlerFunc {
4747
return func(c *gin.Context) {
@@ -107,7 +107,7 @@ func RegenerateHandler(ipaClient *freeipa.Client, cfg *config.Config, k8s kubern
107107
}
108108
}
109109

110-
// UpdateIPHandler serves POST /radius/update-ip changes source IP/CIDR only.
110+
// UpdateIPHandler serves POST /radius/update-ip, changes source IP/CIDR only.
111111
func UpdateIPHandler(cfg *config.Config, k8s kubernetes.Interface, restCfg *rest.Config) gin.HandlerFunc {
112112
return func(c *gin.Context) {
113113
username, _ := getUsername(c)
@@ -143,7 +143,7 @@ func UpdateIPHandler(cfg *config.Config, k8s kubernetes.Interface, restCfg *rest
143143
}
144144
}
145145

146-
// DeleteSecretHandler serves POST /radius/delete revokes cert and removes config.
146+
// DeleteSecretHandler serves POST /radius/delete, revokes cert and removes config.
147147
func DeleteSecretHandler(cfg *config.Config, k8s kubernetes.Interface, restCfg *rest.Config, ipaClient *freeipa.Client) gin.HandlerFunc {
148148
return func(c *gin.Context) {
149149
username, _ := getUsername(c)
@@ -164,7 +164,7 @@ func DeleteSecretHandler(cfg *config.Config, k8s kubernetes.Interface, restCfg *
164164
}
165165
}
166166

167-
// RadSecCAHandler serves GET /radius/ca streams the full RadSec CA chain as PEM.
167+
// RadSecCAHandler serves GET /radius/ca, streams the full RadSec CA chain as PEM.
168168
func RadSecCAHandler(caChainPEM string) gin.HandlerFunc {
169169
return func(c *gin.Context) {
170170
c.Header("Content-Disposition", `attachment; filename="csh-radsec-ca-chain.pem"`)
@@ -263,7 +263,7 @@ func issueClientCredentials(ipaClient *freeipa.Client, cfg *config.Config, usern
263263
}
264264

265265
// revokeExistingCert revokes the cert identified by client.CertSerial.
266-
// Errors are logged but not returned revocation failure should not block deletion or reissuance.
266+
// Errors are logged but not returned; revocation failure should not block deletion or reissuance.
267267
func revokeExistingCert(ipaClient *freeipa.Client, client *radius.RadiusClient, caName string, reason int) {
268268
if client == nil || client.CertSerial == "" {
269269
return

0 commit comments

Comments
 (0)