Translated ['.github/pull_request_template.md', 'src/pentesting-cloud/az

This commit is contained in:
Translator
2024-12-31 18:57:14 +00:00
parent 7770a50092
commit 77a009d308
244 changed files with 8632 additions and 11470 deletions

View File

@@ -2,39 +2,34 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## Grundinformationen
DigitalOcean Functions, also known as "DO Functions," is a serverless computing platform that lets you **run code without having to worry about the underlying infrastructure**. With DO Functions, you can write and deploy your code as "functions" that can be **triggered** via **API**, **HTTP requests** (if enabled) or **cron**. These functions are executed in a fully managed environment, so you **don't need to worry** about scaling, security, or maintenance.
DigitalOcean Functions, auch bekannt als "DO Functions", ist eine serverlose Computing-Plattform, die es Ihnen ermöglicht, **Code auszuführen, ohne sich um die zugrunde liegende Infrastruktur kümmern zu müssen**. Mit DO Functions können Sie Ihren Code als "Funktionen" schreiben und bereitstellen, die über **API**, **HTTP-Anfragen** (wenn aktiviert) oder **Cron** **ausgelöst** werden können. Diese Funktionen werden in einer vollständig verwalteten Umgebung ausgeführt, sodass Sie **sich keine Sorgen machen müssen** über Skalierung, Sicherheit oder Wartung.
In DO, to create a function first you need to **create a namespace** which will be **grouping functions**.\
Inside the namespace you can then create a function.
In DO müssen Sie zunächst **einen Namensraum erstellen**, der **Funktionen gruppiert**.\
Innerhalb des Namensraums können Sie dann eine Funktion erstellen.
### Triggers
The way **to trigger a function via REST API** (always enabled, it's the method the cli uses) is by triggering a request with an **authentication token** like:
### Trigger
Die Art und Weise, **eine Funktion über die REST API auszulösen** (immer aktiviert, es ist die Methode, die die CLI verwendet), besteht darin, eine Anfrage mit einem **Authentifizierungstoken** wie:
```bash
curl -X POST "https://faas-lon1-129376a7.doserverless.co/api/v1/namespaces/fn-c100c012-65bf-4040-1230-2183764b7c23/actions/functionname?blocking=true&result=true" \
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
```
To see how is the **`doctl`** cli tool getting this token (so you can replicate it), the **following command shows the complete network trace:**
Um zu sehen, wie das **`doctl`** CLI-Tool dieses Token erhält (damit Sie es replizieren können), zeigt der **folgende Befehl die vollständige Netzwerkverfolgung:**
```bash
doctl serverless connect --trace
```
**When HTTP trigger is enabled**, a web function can be invoked through these **HTTP methods GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS**.
**Wenn der HTTP-Trigger aktiviert ist**, kann eine Webfunktion über diese **HTTP-Methoden GET, POST, PUT, PATCH, DELETE, HEAD und OPTIONS** aufgerufen werden.
> [!CAUTION]
> In DO functions, **environment variables cannot be encrypted** (at the time of this writing).\
> I couldn't find any way to read them from the CLI but from the console it's straight forward.
> In DO-Funktionen können **Umgebungsvariablen nicht verschlüsselt werden** (zum Zeitpunkt dieses Schreibens).\
> Ich konnte keine Möglichkeit finden, sie über die CLI zu lesen, aber über die Konsole ist es ganz einfach.
**Functions URLs** look like this: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
**Funktions-URLs** sehen so aus: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
### Enumeration
```bash
# Namespace
doctl serverless namespaces list
@@ -53,12 +48,7 @@ doctl serverless activations result <activation-id> # get only the response resu
# I couldn't find any way to get the env variables form the CLI
```
> [!CAUTION]
> There **isn't metadata endpoint** from the Functions sandbox.
> Es **gibt keinen Metadaten-Endpunkt** von der Functions-Sandbox.
{{#include ../../../banners/hacktricks-training.md}}