Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Update and delete records on a DWN

Data management isn't just about creating records; it also involves updating and deleting them as needed. In this chapter, we’ll cover how to update existing records and delete unnecessary ones on your Decentralized Web Node (DWN). Y…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Data management isn't just about creating records; it also involves updating and deleting them as needed.



In this chapter, we’ll cover how to update existing records and delete unnecessary ones on your Decentralized Web Node (DWN). You'll learn the appropriate methods and commands to execute these actions safely and effectively, along with best practices for maintaining data consistency and integrity.



By the end of this chapter, you'll be able to manage your DWN's data lifecycle seamlessly.






Updating a Record



In previous examples, we’ve covered how to create records on a DWN and query them to read one by one. Now, to update a record, you can use the update function.



Here’s how to update a record:




// index.js
// ...

// Read a single record
const { record: singleRecord } = await web5.dwn.records.read({
message: {
filter: {
recordId: "bafyreiflqo2weyflwxn3lzkihopjtaeshbf4drmuf4yhmx6q3zeofv5bh4",
},
},
});

// Update the record
const { status } = await singleRecord.update({
data: {
file: mockTxt, // Example text file
image: mockImage, // Example image file
text: "Updated mixed data", // New data content
},
});

console.log(await singleRecord.data.json()); // Print updated record data









Deleting a Record



To delete a record from your DWN, use the delete function:




// index.js
// ...

// Delete the record
const { status: deleteStatus } = await singleRecord.delete();






And that's it! You’ve successfully performed all the CRUD (Create, Read, Update, Delete) operations on your DWN.






Complete CRUD Example Code



Here’s a complete example showing how to connect to a DWN, create a mixed data record, query it, update, and delete it:




import { Web5 } from "@web5/api";

const { web5, did } = await Web5.connect({
didCreateOptions: {
dwnEndpoints: ["https://dwn.gcda.xyz"], // Community DWN instance on Google Cloud
},
registration: {
onSuccess: () => {
console.log("\n\nConnected successfully");
},
onFailure: (error) => {
console.error("Connection failed:", error);
},
},
});

console.log("\nConnected did:", did);

// Image file
const imageFile = new File(["test image content"], "web5.png", {
type: "image/png",
});
const mockImage = {
currentTarget: {
files: [imageFile], // Simulate a file input
},
};

// txt file
const txtFile = new File(["dummy content"], "web5.txt", {
type: "text/plain",
});

const mockTxt = {
currentTarget: {
files: [txtFile], // Mimic the file input's files array
},
};

// Create Mixed record

const createMixedRecord = async (file, image, text) => {
const { status, record } = await web5.dwn.records.create({
data: {
image,
file,
text,
},
message: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
});

return record;
};

createMixedRecord(mockImage, mockTxt, "Mixed data");

// Query records
const response = await web5.dwn.records.query({
form: did,
message: {
filter: {
schema: "https://test.org/schema/mixed-data",
dataFormat: "application/json",
},
},
});

response.records.forEach(async (record) => {
const result = await record.data.json();
const allRecords = { recordId: record.id, data: result };
console.log(allRecords);
});

// read record
const { record: singleRecord } = await web5.dwn.records.read({
message: {
filter: {
recordId: "bafyreig4vibz5lg4otmftd56qzqisgga7cqw5yeob336z7nn2x3hyv55ha",
},
},
});

console.log(await singleRecord.data.json());

// update a record

const { status } = await singleRecord.update({
data: {
file: mockTxt,
image: mockImage,
text: "Updated mixed data",
},
});

console.log(await singleRecord.data.json());

// delete Record
const { status: deleteStatus } = await singleRecord.delete();










Protocols: The Data Exchange Contracts



Finally, remember that Protocols define the data schema and serve as the contract by which two Decentralized Web Nodes (DWNs) agree to communicate and share data.



Stay tuned for our upcoming post on protocols and how to synchronize data between two DWNs!






Prev ⏪️ ⏪️ ⏪️ Query and Read record

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - Update and delete records on a DWN
id: 9a49cbd8-915d-4f4a-9bf6-5fcc75023ded
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      DestinationHostname:
        - 'dwn.gcda.xyz'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "Update and delete records on a" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
(dest_host="dwn.gcda.xyz")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
destination.domain: ("dwn.gcda.xyz") and event.category: "network"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where DestinationHostName in ("dwn.gcda.xyz")
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

IoC Intelligence (1 Indikatoren)
dwn[.]gcda[.]xyz
CTI Threat Relationship Graph3 Knoten / 2 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Update and delete records on a DWN

Thematisch verwandte Begriffe: Update, delete, records · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2025-71424 | Contrast, Edgeless Systems' runtime for confidential containers on Kuber…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag