Skip to content

Commit 19d3b2a

Browse files
authored
Merge pull request OneIdentity#68 from petrsnd/feature/reorganize-docs
Reorganize documentation with audience-driven navigation
2 parents c478a99 + 606c5bb commit 19d3b2a

139 files changed

Lines changed: 2770 additions & 657 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate-scripts.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ name: Validate Sample Scripts
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
paths:
7-
- 'SampleScripts/**/*.json'
7+
- 'samples/**/*.json'
8+
- 'templates/**/*.json'
89
pull_request:
9-
branches: [master]
10+
branches: [main]
1011
paths:
11-
- 'SampleScripts/**/*.json'
12+
- 'samples/**/*.json'
13+
- 'templates/**/*.json'
1214

1315
jobs:
1416
validate-json:
@@ -22,19 +24,21 @@ jobs:
2224
failed=0
2325
found=0
2426
25-
while IFS= read -r -d '' f; do
26-
found=1
27+
for dir in samples templates; do
28+
while IFS= read -r -d '' f; do
29+
found=1
2730
28-
if ! jq empty "$f" >/dev/null 2>&1; then
29-
echo "::error file=$f::Invalid JSON syntax"
30-
echo "FAILED: $f"
31-
jq empty "$f"
32-
failed=1
33-
fi
34-
done < <(find SampleScripts -type f -name '*.json' -print0)
31+
if ! jq empty "$f" >/dev/null 2>&1; then
32+
echo "::error file=$f::Invalid JSON syntax"
33+
echo "FAILED: $f"
34+
jq empty "$f"
35+
failed=1
36+
fi
37+
done < <(find "$dir" -type f -name '*.json' -print0)
38+
done
3539
3640
if [ "$found" -eq 0 ]; then
37-
echo "No JSON files found under SampleScripts/."
41+
echo "No JSON files found under samples/ or templates/."
3842
exit 0
3943
fi
4044

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"json.schemas": [
33
{
4-
"fileMatch": ["SampleScripts/**/*.json"],
4+
"fileMatch": ["samples/**/*.json", "templates/**/*.json"],
55
"url": "./schema/custom-platform-script.schema.json"
66
}
77
]

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ git checkout -b my-change
1818

1919
## Contributing Sample Scripts
2020

21-
- Add new scripts under `SampleScripts/` in the correct protocol folder:
22-
- `SampleScripts/SSH/`
23-
- `SampleScripts/HTTP/`
24-
- `SampleScripts/Telnet/`
21+
- Add new scripts under `samples/` in the correct protocol folder:
22+
- `samples/ssh/`
23+
- `samples/http/`
24+
- `samples/telnet/`
2525
- Follow the JSON structure in [docs/reference/script-structure.md](docs/reference/script-structure.md).
2626
- Include the standard operations your target supports whenever possible. At minimum, include `CheckSystem` (the operation behind **Test Connection**) and `CheckPassword`, unless accounts change their own passwords on that platform (in which case `CheckSystem` may not apply).
2727
- Use meaningful parameter names and sensible defaults.

README.md

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,66 @@
11
# Safeguard Custom Platform Scripts
22

3-
Build and adapt custom platform scripts for Safeguard when built-in platforms do not fit your target system.
3+
Build custom platform scripts for [Safeguard for Privileged Passwords (SPP)](https://www.oneidentity.com/products/safeguard-for-privileged-passwords/) when built-in platforms don't cover your target system.
44

5-
## What is this?
5+
Custom platform scripts are JSON definitions that teach SPP how to connect to any target — Linux hosts, network appliances, REST APIs, web portals, cloud services — and manage credentials (passwords, SSH keys, API keys) through SSH, HTTP, or Telnet.
66

7-
Safeguard custom platform scripts are JSON-based definitions that tell Safeguard for Privileged Passwords (SPP) how to connect to a target, navigate its interface, and perform credential operations such as password changes, key updates, and account validation.
7+
## Where Do I Start?
88

9-
This repository is for asset administrators and automation teams who need to manage passwords or SSH keys on operating systems, appliances, network devices, web applications, or vendor-specific workflows not covered by built-in platforms. It includes practical guidance and examples for both SSH- and HTTP-based integrations, plus historical Telnet-related content.
9+
| I want to... | Go here |
10+
| --- | --- |
11+
| **Get something working in 5 minutes** | [Quick Start](docs/quick-start/) |
12+
| **Understand how custom platforms work** | [Concepts](docs/concepts/) |
13+
| **Learn step by step with a tutorial** | [Tutorials](docs/tutorials/) |
14+
| **Look up a specific command or parameter** | [Reference](docs/reference/) |
15+
| **Deploy a tested sample script** | [Samples](samples/) |
16+
| **Start a new script from a template** | [Templates](templates/) |
17+
| **Solve a specific problem** | [Guides](docs/guides/) |
1018

11-
## Quick Start
19+
## Repository Layout
1220

13-
If you want the docs and samples locally while you work, clone the repository first:
21+
```
22+
docs/
23+
quick-start/ 5-minute guides to get a working platform fast
24+
concepts/ Architecture, execution model, feature flags
25+
tutorials/ Step-by-step walkthroughs for building scripts
26+
guides/ Task-focused how-to content (SSH patterns, HTTP patterns, etc.)
27+
reference/ Commands, operations, parameters, variables
28+
samples/ Production-tested scripts with companion documentation
29+
ssh/ Linux, Unix, appliance samples
30+
http/ REST API, OAuth2, form-based samples
31+
telnet/ Cisco IOS, IBM RACF TN3270 samples
32+
templates/ Pattern templates and minimal starters (not tested against live targets)
33+
schema/ JSON Schema for IDE autocomplete
34+
tools/ TestTool.ps1 for local validation
35+
```
36+
37+
## Quick Start
1438

1539
```powershell
40+
# Clone the repo
1641
git clone https://github.com/OneIdentity/SafeguardCustomPlatform.git
1742
cd SafeguardCustomPlatform
18-
```
19-
20-
1. **Write.** Start with the closest template in `SampleScripts/Templates/`, then customize commands, prompts, parameters, and validation flow for your target.
21-
2. **Upload.** Use `Import-SafeguardCustomPlatformScript` from `safeguard-ps` to upload the script to SPP.
22-
3. **Test.** Validate against a safe test asset with `Test-SafeguardAssetAccountPassword -ExtendedLogging` before rolling into production.
23-
24-
## Documentation
2543
26-
Start with [`docs/`](docs/) to find the right level of detail for your task:
44+
# Pick a template and customize it
45+
code templates/TemplateSshMinimal.json
2746
28-
- [`docs/getting-started/`](docs/getting-started/) - Tutorials and first-script walkthroughs for new custom platform authors.
29-
- [`docs/reference/`](docs/reference/) - Script structure, supported operations, parameters, and command behavior.
30-
- [`docs/guides/`](docs/guides/) - SSH patterns, HTTP patterns, regex guidance, and advanced implementation topics.
31-
- [`docs/guides/regex-patterns.md`](docs/guides/regex-patterns.md) - Practical .NET regex patterns for prompts, parsing, and error detection.
32-
- [`docs/guides/feature-flags.md`](docs/guides/feature-flags.md) - Understand which operations and capabilities your platform advertises.
33-
- [`docs/guides/troubleshooting.md`](docs/guides/troubleshooting.md) - Common errors, diagnostic tips, and fixes.
47+
# Upload to SPP
48+
Import-SafeguardCustomPlatformScript -FilePath .\MyPlatform.json
3449
35-
## Sample Scripts
36-
37-
Browse [`SampleScripts/`](SampleScripts/) for working examples you can study or adapt. Samples are organized by protocol so you can quickly focus on the right category:
50+
# Test
51+
Test-SafeguardAssetAccountPassword -AssetToUse "MyHost" -AccountToUse "admin" -ExtendedLogging
52+
```
3853

39-
- SSH
40-
- HTTP
41-
- Telnet
54+
For detailed quick-start paths, see [docs/quick-start/](docs/quick-start/).
4255

4356
## Tools
4457

45-
Use [`tools/TestTool.ps1`](tools/TestTool.ps1) to test custom platform scripts locally before uploading them to SPP.
46-
47-
## Telnet / Pattern Files
48-
49-
Telnet pattern files have moved to [SafeguardAutomation](https://github.com/OneIdentity/SafeguardAutomation/tree/master/Terminal%20Pattern%20Files).
58+
- [`tools/TestTool.ps1`](tools/TestTool.ps1) — Validate script JSON locally before uploading to SPP
59+
- [`schema/custom-platform-script.schema.json`](schema/custom-platform-script.schema.json) — JSON Schema for IDE autocomplete (VS Code configured automatically)
5060

5161
## Contributing
5262

53-
Contributions are welcome, including new sample scripts, fixes, and documentation improvements. See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines, and feel free to share community-tested samples that others can adapt.
63+
Contributions are welcome new sample scripts, documentation improvements, and bug fixes. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
5464

5565
## Support
5666

@@ -59,20 +69,3 @@ One Identity open source projects are supported through [GitHub issues](https://
5969
## License
6070

6171
See [LICENSE](LICENSE).
62-
63-
## Compatibility Matrix
64-
65-
> Approximate only — check your SPP release notes for exact availability in your build.
66-
67-
| SPP Version | Custom Platform Feature Added |
68-
| --- | --- |
69-
| 6.0 | Custom platforms introduced (SSH, Telnet) |
70-
| 6.7 | HTTP/REST custom platforms added |
71-
| 7.0 | `DiscoverAccounts` |
72-
| 7.0 | `DiscoverServices` |
73-
| 7.0 | `DiscoverSshHostKey` |
74-
| 7.4 | `ExecuteCommand` (SSH batch mode) |
75-
| 7.4 | `ExecuteDependentCommand` (dependent system workflows) |
76-
| 7.5 | `ElevateAccount` / `DemoteAccount` |
77-
| 7.5 | `EnableAccount` / `DisableAccount` |
78-
| 7.6 | `CheckFile` / `ChangeFile` |

SampleScripts/HTTP/README.md

Lines changed: 0 additions & 171 deletions
This file was deleted.

0 commit comments

Comments
 (0)