fix: bound seed streams, durable seed, apt sources
Task 1 review round 1 (Astra R1). P1-1: one seed stream's whole life (store open, store reads, socket writes) is bounded by a 5-minute deadline: a context deadline whose expiry closes the store body, plus a response write deadline. A box may hold only one stream at a time, so one token holds at most one of the four slots. Tests prove stalled clients and stalled store reads expire and the next box downloads. P2-1: the verified seed is fsynced, renamed and its directory fsynced before any unit is enabled or started; the script-run witness checks the order. P2-2: apt sources list base, -updates and -security as separate entries; the witness asserts the file; golden regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 files changed,
+298
−16
internal/console/managedseed.go+53 −2internal/console/managedseed_linux_test.go+32 −0internal/console/managedseed_test.go+191 −10internal/managedboot/cloudinit_v1.sh.tmpl+11 −2internal/managedboot/testdata/userdata-v1.golden+11 −2
diff --git a/internal/console/managedseed.go b/internal/console/managedseed.go| index 2d5234b89..bcef5cadf 100644 |
| --- a/internal/console/managedseed.go |
| +++ b/internal/console/managedseed.go |
| @@ -6,11 +6,13 @@ import ( |
| "crypto/sha256" |
| "encoding/hex" |
| "encoding/json" |
| + "errors" |
| "io" |
| "log" |
| "net/http" |
| "os" |
| "strconv" |
| + "sync" |
| "time" |
| "github.com/carlosframework/platform/internal/managedboot" |
| @@ -27,6 +29,35 @@ const managedSeedMaxBytes = 96 << 20 |
| // managedSeedStreams bounds concurrent seed streams across the console. |
| var managedSeedStreams = make(chan struct{}, 4) |
| +// managedSeedStreamTimeout bounds one seed stream's whole life: the store |
| +// open, every store read and every socket write. Five minutes carries the |
| +// 96 MiB cap at about 330 KiB/s, far below any EC2-to-console path (a real |
| +// seed is a few tens of MiB at several MiB/s), so it only ends streams that |
| +// have stalled. It is a variable only so tests can shorten it. |
| +var managedSeedStreamTimeout = 5 * time.Minute |
| + |
| +// managedSeedActive holds the boxes with a stream in flight. A box needs |
| +// one stream; refusing a second keeps one token from holding more than one |
| +// of the four slots. |
| +var managedSeedActive = struct { |
| + sync.Mutex |
| + boxes map[string]bool |
| +}{boxes: map[string]bool{}} |
| + |
| +func managedSeedClaim(id string) (release func(), ok bool) { |
| + managedSeedActive.Lock() |
| + defer managedSeedActive.Unlock() |
| + if managedSeedActive.boxes[id] { |
| + return nil, false |
| + } |
| + managedSeedActive.boxes[id] = true |
| + return func() { |
| + managedSeedActive.Lock() |
| + delete(managedSeedActive.boxes, id) |
| + managedSeedActive.Unlock() |
| + }, true |
| +} |
| + |
| // handleManagedSeed is POST /api/fleet/enrol/seed: a box presents its |
| // unused enrolment token and receives the frozen seed binary. The token is |
| // not consumed. The console does not vouch for the bytes; the box checks |
| @@ -59,6 +90,12 @@ func (s *Server) handleManagedSeed(w http.ResponseWriter, r *http.Request) { |
| writeManagedEnrolError(w, err) |
| return |
| } |
| + releaseBox, ok := managedSeedClaim(b.Fleet + "/" + b.Label) |
| + if !ok { |
| + writeManagedEnrolError(w, errManagedEnrolRetryable) |
| + return |
| + } |
| + defer releaseBox() |
| select { |
| case managedSeedStreams <- struct{}{}: |
| defer func() { <-managedSeedStreams }() |
| @@ -66,13 +103,27 @@ func (s *Server) handleManagedSeed(w http.ResponseWriter, r *http.Request) { |
| writeManagedEnrolError(w, errManagedEnrolRetryable) |
| return |
| } |
| - body, size, err := s.openManagedSeed(r.Context(), frozen.SeedKey) |
| + // One deadline covers the whole stream. The write deadline unblocks a |
| + // client that stops reading; cancelling ctx closes the store body, |
| + // which unblocks a stalled read. Either way the handler returns and the |
| + // slots above are released. |
| + deadline := time.Now().Add(managedSeedStreamTimeout) |
| + ctx, cancel := context.WithDeadline(r.Context(), deadline) |
| + defer cancel() |
| + if err = http.NewResponseController(w).SetWriteDeadline(deadline); err != nil && !errors.Is(err, http.ErrNotSupported) { |
| + writeManagedEnrolError(w, errManagedEnrolRetryable) |
| + return |
| + } |
| + body, size, err := s.openManagedSeed(ctx, frozen.SeedKey) |
| if err != nil { |
| log.Printf("console: managed seed: %s/%s: seed unavailable", b.Fleet, b.Label) |
| writeManagedEnrolError(w, errManagedEnrolRetryable) |
| return |
| } |
| - defer body.Close() |
| + var closeOnce sync.Once |
| + closeBody := func() { closeOnce.Do(func() { body.Close() }) } |
| + stop := context.AfterFunc(ctx, closeBody) |
| + defer func() { stop(); closeBody() }() |
| w.Header().Set("Content-Type", "application/octet-stream") |
| w.Header().Set("Content-Length", strconv.FormatInt(size, 10)) |
| w.WriteHeader(http.StatusOK) |
diff --git a/internal/console/managedseed_linux_test.go b/internal/console/managedseed_linux_test.go| index 076f8d226..2acfae94d 100644 |
| --- a/internal/console/managedseed_linux_test.go |
| +++ b/internal/console/managedseed_linux_test.go |
| @@ -165,6 +165,38 @@ func TestManagedCloudInitScriptRun(t *testing.T) { |
| if strings.Join(tail, "\n") != strings.Join(want, "\n") { |
| t.Fatalf("final calls\n%s", strings.Join(tail, "\n")) |
| } |
| + // The seed is verified, fsynced, renamed and its directory |
| + // fsynced before any unit is enabled or started. |
| + index := func(match func(string) bool) int { |
| + for i, c := range calls { |
| + if match(c) { |
| + return i |
| + } |
| + } |
| + return -1 |
| + } |
| + verifyPart := index(func(c string) bool { return c == "python3 -I "+bootDir+"/verify.py seed.part" }) |
| + install := index(func(c string) bool { |
| + return strings.HasPrefix(c, "python3 -I -c ") && strings.HasSuffix(c, " "+bootDir) && strings.Contains(c, "os.fsync(f)") && |
| + strings.Contains(c, `os.rename(w + "/seed.part", w + "/seed")`) && strings.Index(c, "os.fsync(f)") < strings.Index(c, "os.rename(") && |
| + strings.Index(c, "os.rename(") < strings.Index(c, "os.fsync(d)") |
| + }) |
| + reload := index(func(c string) bool { return c == "systemctl daemon-reload" }) |
| + if verifyPart < 0 || install <= verifyPart || reload <= install { |
| + t.Fatalf("seed install order: verify=%d install=%d reload=%d\n%s", verifyPart, install, reload, strings.Join(calls, "\n")) |
| + } |
| + sources, err := os.ReadFile(filepath.Join(bootDir, "sources.list")) |
| + signedBy := "[signed-by=/usr/share/keyrings/debian-archive-keyring.gpg]" |
| + if err != nil || string(sources) != "deb "+signedBy+" https://deb.debian.org/debian trixie main\ndeb "+signedBy+" https://deb.debian.org/debian trixie-updates main\ndeb "+signedBy+" https://deb.debian.org/debian-security trixie-security main\n" { |
| + t.Fatalf("sources.list:\n%s (%v)", sources, err) |
| + } |
| + for _, verb := range []string{"update", "install nftables curl ca-certificates python3"} { |
| + if index(func(c string) bool { |
| + return strings.HasPrefix(c, "apt-get ") && strings.Contains(c, "-o Dir::Etc::SourceList="+bootDir+"/sources.list -o Dir::Etc::SourceParts=/dev/null "+verb) |
| + }) < 0 { |
| + t.Fatalf("apt-get %s does not use only the managed sources", verb) |
| + } |
| + } |
| var verified int |
| for _, c := range calls { |
| if strings.HasPrefix(c, "python3 -I "+bootDir+"/verify.py") { |
diff --git a/internal/console/managedseed_test.go b/internal/console/managedseed_test.go| index b2ce5b2d8..d34a730ce 100644 |
| --- a/internal/console/managedseed_test.go |
| +++ b/internal/console/managedseed_test.go |
| @@ -11,6 +11,7 @@ import ( |
| "errors" |
| "fmt" |
| "io" |
| + "net/http" |
| "net/http/httptest" |
| "reflect" |
| "slices" |
| @@ -283,19 +284,107 @@ func (st *managedSeedTestStore) Open(ctx context.Context, key string) (io.ReadCl |
| type heldBody struct { |
| *bytes.Reader |
| - hold chan struct{} |
| - size int64 |
| - once sync.Once |
| + hold chan struct{} |
| + size int64 |
| + once sync.Once |
| + closed chan struct{} |
| + shut sync.Once |
| } |
| +// Read waits for hold before its first read; Close unblocks it, as closing |
| +// a network body does. |
| func (h *heldBody) Read(p []byte) (int, error) { |
| if h.hold != nil { |
| - h.once.Do(func() { <-h.hold }) |
| + var err error |
| + h.once.Do(func() { |
| + select { |
| + case <-h.hold: |
| + case <-h.closedCh(): |
| + err = errors.New("body closed") |
| + } |
| + }) |
| + if err != nil { |
| + return 0, err |
| + } |
| } |
| return h.Reader.Read(p) |
| } |
| -func (h *heldBody) Close() error { return nil } |
| -func (h *heldBody) Size() int64 { return h.size } |
| +func (h *heldBody) closedCh() chan struct{} { |
| + h.shut.Do(func() { |
| + if h.closed == nil { |
| + h.closed = make(chan struct{}) |
| + } |
| + }) |
| + return h.closed |
| +} |
| +func (h *heldBody) Close() error { |
| + ch := h.closedCh() |
| + select { |
| + case <-ch: |
| + default: |
| + close(ch) |
| + } |
| + return nil |
| +} |
| +func (h *heldBody) Size() int64 { return h.size } |
| + |
| +// seedFleet launches n boxes of one fleet and returns their tokens. |
| +func seedFleet(t *testing.T, n int) (*Server, []string) { |
| + t.Helper() |
| + ctx := context.Background() |
| + s, _ := managedPreparationFixture(t) |
| + setManagedHistoryIncomplete(t, s) |
| + r := managedReq("shop", "abc") |
| + r.Boxes = n |
| + op, bs, _, err := s.reserveManagedFleet(ctx, r) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err = s.prepareManagedFleet(ctx, op, bs); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err = s.RunManagedFleetsPass(ctx, time.Now().UTC()); err != nil { |
| + t.Fatal(err) |
| + } |
| + _, boxes, err := s.store.ManagedFleet(ctx, "abc", "shop") |
| + if err != nil || len(boxes) != n { |
| + t.Fatal(len(boxes), err) |
| + } |
| + key, _, err := openManagedEnrolKey(s.cfg.AlertSealKeyPath) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var tokens []string |
| + for _, b := range boxes { |
| + if b.State != "launching" && b.State != "booting" { |
| + t.Fatalf("%s: %s", b.Label, b.State) |
| + } |
| + token, _ := deriveManagedEnrolToken(key, b.ClientToken) |
| + tokens = append(tokens, token) |
| + } |
| + s.cli = newCLILimits() |
| + return s, tokens |
| +} |
| + |
| +// shortSeedStreams shortens the stream bound for one test. |
| +func shortSeedStreams(t *testing.T, d time.Duration) { |
| + t.Helper() |
| + saved := managedSeedStreamTimeout |
| + managedSeedStreamTimeout = d |
| + t.Cleanup(func() { managedSeedStreamTimeout = saved }) |
| +} |
| + |
| +// waitSeedSlots waits until no seed stream holds a slot. |
| +func waitSeedSlots(t *testing.T, within time.Duration) { |
| + t.Helper() |
| + until := time.Now().Add(within) |
| + for len(managedSeedStreams) != 0 { |
| + if time.Now().After(until) { |
| + t.Fatalf("%d seed slots still held", len(managedSeedStreams)) |
| + } |
| + time.Sleep(10 * time.Millisecond) |
| + } |
| +} |
| func TestManagedSeedDoor(t *testing.T) { |
| ctx := context.Background() |
| @@ -427,7 +516,7 @@ func TestManagedSeedDoor(t *testing.T) { |
| } |
| }) |
| t.Run("four streams", func(t *testing.T) { |
| - s, _, token, _ := enrolFixture(t) |
| + s, tokens := seedFleet(t, 5) |
| st := &managedSeedTestStore{Store: s.cfg.Releases, hold: make(chan struct{}), started: make(chan struct{}, 8)} |
| s.cfg.Releases = st |
| var wg sync.WaitGroup |
| @@ -436,7 +525,7 @@ func TestManagedSeedDoor(t *testing.T) { |
| wg.Add(1) |
| go func(i int) { |
| defer wg.Done() |
| - codes <- seedHTTP(s, seedBody(token), fmt.Sprintf("192.0.2.%d", 40+i)).Code |
| + codes <- seedHTTP(s, seedBody(tokens[i]), fmt.Sprintf("192.0.2.%d", 40+i)).Code |
| }(i) |
| } |
| for i := 0; i < 4; i++ { |
| @@ -446,7 +535,7 @@ func TestManagedSeedDoor(t *testing.T) { |
| t.Fatal("streams did not start") |
| } |
| } |
| - w := seedHTTP(s, seedBody(token), "192.0.2.50") |
| + w := seedHTTP(s, seedBody(tokens[4]), "192.0.2.50") |
| if w.Code != 503 || w.Header().Get("Retry-After") != "5" { |
| t.Fatalf("fifth stream: %d", w.Code) |
| } |
| @@ -459,10 +548,102 @@ func TestManagedSeedDoor(t *testing.T) { |
| } |
| } |
| st.hold = nil |
| - if w = seedHTTP(s, seedBody(token), "192.0.2.51"); w.Code != 200 { |
| + if w = seedHTTP(s, seedBody(tokens[4]), "192.0.2.51"); w.Code != 200 { |
| t.Fatalf("slots not released: %d", w.Code) |
| } |
| }) |
| + t.Run("one stream per box", func(t *testing.T) { |
| + s, tokens := seedFleet(t, 2) |
| + st := &managedSeedTestStore{Store: s.cfg.Releases, hold: make(chan struct{}), started: make(chan struct{}, 8)} |
| + s.cfg.Releases = st |
| + done := make(chan int, 1) |
| + go func() { done <- seedHTTP(s, seedBody(tokens[0]), "192.0.2.60").Code }() |
| + <-st.started |
| + if w := seedHTTP(s, seedBody(tokens[0]), "192.0.2.61"); w.Code != 503 || w.Header().Get("Retry-After") != "5" { |
| + t.Fatalf("second stream for one box: %d", w.Code) |
| + } |
| + other := make(chan int, 1) |
| + go func() { other <- seedHTTP(s, seedBody(tokens[1]), "192.0.2.62").Code }() |
| + <-st.started |
| + close(st.hold) |
| + if c := <-done; c != 200 { |
| + t.Fatal(c) |
| + } |
| + if c := <-other; c != 200 { |
| + t.Fatalf("another box refused: %d", c) |
| + } |
| + st.hold = nil |
| + if w := seedHTTP(s, seedBody(tokens[0]), "192.0.2.63"); w.Code != 200 { |
| + t.Fatalf("box slot not released: %d", w.Code) |
| + } |
| + }) |
| + t.Run("stalled store read expires", func(t *testing.T) { |
| + shortSeedStreams(t, 200*time.Millisecond) |
| + s, tokens := seedFleet(t, 2) |
| + st := &managedSeedTestStore{Store: s.cfg.Releases, hold: make(chan struct{}), started: make(chan struct{}, 8)} |
| + s.cfg.Releases = st |
| + done := make(chan struct{}) |
| + go func() { seedHTTP(s, seedBody(tokens[0]), "192.0.2.70"); close(done) }() |
| + <-st.started |
| + select { |
| + case <-done: |
| + case <-time.After(10 * time.Second): |
| + t.Fatal("a stalled store read held its stream past the bound") |
| + } |
| + waitSeedSlots(t, time.Second) |
| + st.hold = nil |
| + if w := seedHTTP(s, seedBody(tokens[1]), "192.0.2.71"); w.Code != 200 || !bytes.Equal(w.Body.Bytes(), managedTestSeed) { |
| + t.Fatalf("next box after expiry: %d", w.Code) |
| + } |
| + }) |
| + t.Run("stalled clients expire", func(t *testing.T) { |
| + shortSeedStreams(t, 2*time.Second) |
| + s, tokens := seedFleet(t, 5) |
| + // Large enough to fill the socket buffers of a client that never reads. |
| + big := bytes.Repeat([]byte("s"), 48<<20) |
| + _, boxes, _ := s.store.ManagedFleet(ctx, "abc", "shop") |
| + key := boxes[0].Boot.SeedKey |
| + _, etag, _ := s.cfg.Releases.Get(ctx, key) |
| + if _, err := s.cfg.Releases.Put(ctx, key, big, etag); err != nil { |
| + t.Fatal(err) |
| + } |
| + srv := httptest.NewServer(http.HandlerFunc(s.handleManagedSeed)) |
| + defer srv.Close() |
| + post := func(token string) *http.Response { |
| + resp, err := http.Post(srv.URL+"/api/fleet/enrol/seed", "application/json", strings.NewReader(seedBody(token))) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return resp |
| + } |
| + // Four boxes take every slot and stop reading. |
| + var stalled []*http.Response |
| + for i := 0; i < 4; i++ { |
| + resp := post(tokens[i]) |
| + if resp.StatusCode != 200 { |
| + t.Fatalf("stalled %d: %d", i, resp.StatusCode) |
| + } |
| + stalled = append(stalled, resp) |
| + } |
| + defer func() { |
| + for _, r := range stalled { |
| + r.Body.Close() |
| + } |
| + }() |
| + if resp := post(tokens[4]); resp.StatusCode != 503 { |
| + resp.Body.Close() |
| + t.Fatalf("fifth box while full: %d", resp.StatusCode) |
| + } else { |
| + resp.Body.Close() |
| + } |
| + waitSeedSlots(t, 15*time.Second) |
| + resp := post(tokens[4]) |
| + defer resp.Body.Close() |
| + got, err := io.ReadAll(resp.Body) |
| + if resp.StatusCode != 200 || err != nil || !bytes.Equal(got, big) { |
| + t.Fatalf("next box after expiry: %d %v %d bytes", resp.StatusCode, err, len(got)) |
| + } |
| + }) |
| } |
| func managedNoToken(t *testing.T, w *httptest.ResponseRecorder, token string) { |
diff --git a/internal/managedboot/cloudinit_v1.sh.tmpl b/internal/managedboot/cloudinit_v1.sh.tmpl| index 994bf7631..d40e94a0a 100644 |
| --- a/internal/managedboot/cloudinit_v1.sh.tmpl |
| +++ b/internal/managedboot/cloudinit_v1.sh.tmpl |
| @@ -71,7 +71,7 @@ put() { python3 -I -c "$P" "$R$1" "$2"; } |
| C=$(sed -n 's/^VERSION_CODENAME=//p' "$R/etc/os-release") |
| case $C in ''|*[!a-z]*) exit 1 ;; esac |
| K='[signed-by=/usr/share/keyrings/debian-archive-keyring.gpg]' |
| -printf 'deb %s https://deb.debian.org/debian %s %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600 |
| +printf 'deb %s https://deb.debian.org/debian %s main\ndeb %s https://deb.debian.org/debian %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$K" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600 |
| apt-get -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null update |
| apt-get -y -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null install nftables curl ca-certificates python3 |
| id -u carlos >/dev/null 2>&1 || useradd --system --user-group --no-create-home --shell /usr/sbin/nologin carlos |
| @@ -144,7 +144,16 @@ printf '%s' {{sq .SeedSHA256}} | put /var/lib/carlos-managed-boot/seed.sha256 60 |
| curl --proto =https --tlsv1.2 -fsS --retry 20 --retry-max-time 600 --max-filesize 100663296 -H 'Content-Type: application/json' --data-binary @"$B/seed-request.json" -o "$B/seed.part" "$ORIGIN/api/fleet/enrol/seed" |
| chmod 0700 "$B/seed.part" |
| python3 -I "$B/verify.py" seed.part |
| -mv -fT "$B/seed.part" "$B/seed" |
| +# The verified seed is durable before any unit can depend on it. |
| +python3 -I -c 'import os, sys |
| +w = sys.argv[1] |
| +f = os.open(w + "/seed.part", os.O_RDONLY | os.O_NOFOLLOW) |
| +os.fsync(f) |
| +os.close(f) |
| +os.rename(w + "/seed.part", w + "/seed") |
| +d = os.open(w, os.O_RDONLY | os.O_DIRECTORY) |
| +os.fsync(d) |
| +os.close(d)' "$B" |
| rm -f "$B/seed-request.json" |
| crumb seed_verified |
diff --git a/internal/managedboot/testdata/userdata-v1.golden b/internal/managedboot/testdata/userdata-v1.golden| index ef4546897..673345546 100644 |
| --- a/internal/managedboot/testdata/userdata-v1.golden |
| +++ b/internal/managedboot/testdata/userdata-v1.golden |
| @@ -71,7 +71,7 @@ put() { python3 -I -c "$P" "$R$1" "$2"; } |
| C=$(sed -n 's/^VERSION_CODENAME=//p' "$R/etc/os-release") |
| case $C in ''|*[!a-z]*) exit 1 ;; esac |
| K='[signed-by=/usr/share/keyrings/debian-archive-keyring.gpg]' |
| -printf 'deb %s https://deb.debian.org/debian %s %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600 |
| +printf 'deb %s https://deb.debian.org/debian %s main\ndeb %s https://deb.debian.org/debian %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$K" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600 |
| apt-get -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null update |
| apt-get -y -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null install nftables curl ca-certificates python3 |
| id -u carlos >/dev/null 2>&1 || useradd --system --user-group --no-create-home --shell /usr/sbin/nologin carlos |
| @@ -144,7 +144,16 @@ printf '%s' 'abababababababababababababababababababababababababababababababab' | |
| curl --proto =https --tlsv1.2 -fsS --retry 20 --retry-max-time 600 --max-filesize 100663296 -H 'Content-Type: application/json' --data-binary @"$B/seed-request.json" -o "$B/seed.part" "$ORIGIN/api/fleet/enrol/seed" |
| chmod 0700 "$B/seed.part" |
| python3 -I "$B/verify.py" seed.part |
| -mv -fT "$B/seed.part" "$B/seed" |
| +# The verified seed is durable before any unit can depend on it. |
| +python3 -I -c 'import os, sys |
| +w = sys.argv[1] |
| +f = os.open(w + "/seed.part", os.O_RDONLY | os.O_NOFOLLOW) |
| +os.fsync(f) |
| +os.close(f) |
| +os.rename(w + "/seed.part", w + "/seed") |
| +d = os.open(w, os.O_RDONLY | os.O_DIRECTORY) |
| +os.fsync(d) |
| +os.close(d)' "$B" |
| rm -f "$B/seed-request.json" |
| crumb seed_verified |