docs: add requirement analysis #1

Merged
felix.gohla merged 4 commits from docs/requirements into main 2026-02-22 16:12:35 +01:00
Owner
No description provided.
felix.gohla changed title from docs: add requirement analysis to draft: docs: add requirement analysis 2025-10-26 09:49:07 +01:00
felix.gohla changed title from draft: docs: add requirement analysis to WIP: draft: docs: add requirement analysis 2025-10-26 09:49:24 +01:00
felix.gohla changed title from WIP: draft: docs: add requirement analysis to WIP: docs: add requirement analysis 2025-10-26 09:49:29 +01:00
Author
Owner

@felix.auringer This is not yet complete but it would be great to have a disucssion on what we want to achieve (if we want to achieve that). 😊

@felix.auringer This is not yet complete but it would be great to have a disucssion on what we want to achieve (if we want to achieve that). 😊
@ -0,0 +12,4 @@
The CTF platform should be designed so that a multitude of requirements regarding challenges and usage is considered.
When designing the platform, we for now only consider jeopardy-style CTFs (no attack-defense-style CTFs)
### Users and Authentication

I would add groups here. We should support at least player and administrator as different groups and all authentication possibilities should provide these.

I would add groups here. We should support at least player and administrator as different groups and all authentication possibilities should provide these.
Author
Owner

I added a paragraph on roles.

I added a paragraph on roles.
felix.auringer marked this conversation as resolved
@ -0,0 +14,4 @@
### Users and Authentication
Users must be able to log in to the platform via any OIDC-compatible IdP.

I think there should be an interface with an implementation for OIDC. Forcing OIDC would maybe prevent smaller CTFs from using it because they do not want to set up any IdP.

I think there should be an interface with an implementation for OIDC. Forcing OIDC would maybe prevent smaller CTFs from using it because they do not want to set up any IdP.
Author
Owner

This is up for discussion. Added a paragraph on a authentication method that works without OIDC.

This is up for discussion. Added a paragraph on a authentication method that works without OIDC.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +15,4 @@
### Users and Authentication
Users must be able to log in to the platform via any OIDC-compatible IdP.
Users must be able to create and join teams with an invite-link or token.

Users must be able to create teams and join them with an invite-link or token.

Users must be able to create teams and join them with an invite-link or token.
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +19,4 @@
The platform must support both competitions for teams and individuals.
The entity that is credited for the scores is called an Account.
For integration with other services (like Discord bots and support), the user and account must have secret tokens that can be used to prove access to the user and account.

Should changing the username be a part of the API or the authentication before that? (I cannot comment on every line, so this comment is on the line above 🤷‍♂️)

Should changing the username be a part of the API or the authentication before that? (I cannot comment on every line, so this comment is on the line above 🤷‍♂️)
Author
Owner

Removed the requirement.

Removed the requirement.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +17,4 @@
Users must be able to log in to the platform via any OIDC-compatible IdP.
Users must be able to create and join teams with an invite-link or token.
The platform must support both competitions for teams and individuals.
The entity that is credited for the scores is called an Account.

Is this (especially naming) really part of the requirements?

Is this (especially naming) really part of the requirements?
Author
Owner

For clear naming within the requirements document: yes.

For clear naming within the requirements document: yes.
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +27,4 @@
Challenges are the main part of the platform. Challenges consist of one or more flags.
Flags must be customizable (=flag instancing) to the account so that cheating can be detected more easily. But hard-coded flags must also be supported.
#### Prerequisites

Not sure whether this fits here but I would also like to have challenges that unlock depending on other conditions, i.e., at a specific time.

Not sure whether this fits here but I would also like to have challenges that unlock depending on other conditions, i.e., at a specific time.
Author
Owner

Good idea, added a sentence on other prerequisite types.

Good idea, added a sentence on other prerequisite types.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +29,4 @@
#### Prerequisites
It must be possible to allow accessing challenges only after a set of other challenges were completed. It must not be possible to gain information about challenges that are not unlocked.

Should we also differentiate between completely hidden and locked-but-announced challenges?

Should we also differentiate between completely hidden and locked-but-announced challenges?
Author
Owner

Good idea, we had this discussion with the old platform as well.

Good idea, we had this discussion with the old platform as well.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +60,4 @@
* Challenge IP and Ports as well as a hint to what this kind of service is (maybe a short description)
Exposing information like ports and IP must be possible for all types of interactive challenges.
### Networking

I would add raw port exposal. Definitely with a big warning in the docs but I think it further lowers the bar for adoption.

I would add raw port exposal. Definitely with a big warning in the docs but I think it further lowers the bar for adoption.
Author
Owner

I think raw port exposal is not something, we should support, as it can be too easily enumerated from other users and, thus, causes more trouble. Furthermore, there are enough settings (e.g. in a university) where not all ports make be exposed.

I think raw port exposal is not something, we should support, as it can be too easily enumerated from other users and, thus, causes more trouble. Furthermore, there are enough settings (e.g. in a university) where not all ports make be exposed.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +62,4 @@
### Networking
As challenges of also require fiddling with the network, the platform must support a variety of different network operations starting at ISO / OSI layer 2 to allow for challenges that, e.g., require ARP spoofing.

often?

often?
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +93,4 @@
The exact interface has yet to be defined as it must be common functionality subset across orchestrators (or provide an extension point).
Examples for orchestrators are a Kubernetes orchestrator or a Docker orchestrator.
### User-Environment

I like the Flugzeug but I would give it a very low priority 😅

I like the Flugzeug but I would give it a very low priority 😅
Author
Owner

Priority is not somehting modeled in this document, yet.

Priority is not somehting modeled in this document, yet.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +77,4 @@
#### VPN Access
Some challenges cannot be solved without having access to the internal network.
Therefore, access to the isolated challenge network "playground" is necessary were users can interact with challenges as they wish.

Is the playground network an account-based network or a challenge-instance-based network?

Is the playground network an account-based network or a challenge-instance-based network?
Author
Owner

I removed the "playground" part. I meant the whole network that is reachable for the account.

I removed the `"playground"` part. I meant the whole network that is reachable for the account.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +105,4 @@
* TODO: Updating the base image
### Scoring

Maybe add that it should be possible to select the scoring algorithm? On the congress, there was some feedback that our old concept was gameable. There also might be CTFs with a fixed number of participants where a scoring algorithm using that additional information could be benefitial.

Maybe add that it should be possible to select the scoring algorithm? On the congress, there was some feedback that our old concept was gameable. There also might be CTFs with a fixed number of participants where a scoring algorithm using that additional information could be benefitial.
Author
Owner

Added. However, we need to discuss details on whether how exactly the algorithms work and whether we need to support algorithms per challenge.

Added. However, we need to discuss details on whether how exactly the algorithms work and whether we need to support algorithms per challenge.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +124,4 @@
#### Notifications
The administrators should be able to post global notifications and notifications regarding specific challenges.
The user must be able to acknowledge these notifications.

Why is acknowledging those important? 😅

Why is acknowledging those important? 😅
Author
Owner

Clarified.

Clarified.
felix.auringer marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +139,4 @@
## Non-Functional
Apart from functional requirements, we collected a set of non-functional requirements that make working with the platform (TODO: find word).

pleasant?

pleasant?
felix.auringer marked this conversation as resolved
@ -0,0 +11,4 @@
## Implementation
The implementation can happen with [OVN](https://www.ovn.org/en/).
There, we can have a central database (with ``northd`` and `southd`).

What's with the double backtick here?

What's with the double backtick here?
Author
Owner

Removed.

Removed.
felix.auringer marked this conversation as resolved
@ -0,0 +37,4 @@
L2TP/IPsec provides another well-supported VPN solution that can be configured from the major operating systems (even with GUI!).
For the built-in VPN solution, we could provide config files (profiles on macOS or a config for importing with `nmtui`) for simple configuration.
The issue is that L2TP, despite it's name, only tunnels [PPP](https://en.wikipedia.org/wiki/Point-to-Point_Protocol).
It seems hard to tunnel all Ethernet frames via the interface.

We do not want all ethernet frames, right? Only the ones for which an upper layer has chosen the vpn interface based on routes or for which the user has explicitly chosen the interface.

We do not want all ethernet frames, right? Only the ones for which an upper layer has chosen the vpn interface based on routes or for which the user has explicitly chosen the interface.
Author
Owner

Clarified.

Clarified.
felix.auringer marked this conversation as resolved
@ -0,0 +42,4 @@
### L2TPv3
A solution to the layer 2 problem would be [L2TPv3](https://datatracker.ietf.org/doc/html/rfc3931).
However, being standardized in 2005, it still has no support in major operating systems but in some of the enterprise swtiches only.

switches

switches
felix.auringer marked this conversation as resolved
felix.gohla force-pushed docs/requirements from cfc6bfd928 to fb1e6d190f 2026-01-25 18:47:27 +01:00 Compare
felix.gohla changed title from WIP: docs: add requirement analysis to docs: add requirement analysis 2026-01-25 19:18:17 +01:00
@ -0,0 +125,4 @@
Starting challenges must be an automated process in case of interactive isolated challenges.
Challenges can consist of multiple services that interact with one another.
As CTFs and the number of interactive challenges differs in size, there should be multiple different orchestration services that take the responsibility to start and stop challenges in virtual environments.
Member

As CTFs and the number of interactive challenges differs in size,

I think that's not grammatically correct, I would suggest

As CTFs differ in size and number of interactive challenges,

> As CTFs and the number of interactive challenges differs in size, I think that's not grammatically correct, I would suggest > As CTFs differ in size and number of interactive challenges,

Done.

Done.
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +152,4 @@
The platform must support score groups.
Score groups are a mechanism for multiple, completely independent groups to participate in a competition without interfering with each other.
Examples are age groups where only specific age groups are eligible for winning prices.
Scoreboards should be visible for all score groups.
Member

I assume this is referring to all scoreboards being visible to all score groups?

Maybe change to:

Members of one score group should be able to see the scoreboards for all other score groups, as well as their own.

I assume this is referring to all scoreboards being visible to all score groups? Maybe change to: > Members of one score group should be able to see the scoreboards for all other score groups, as well as their own.
First-time contributor

I would word it to:

Members of one score group may be permitted to view the scoreboards of another score group, as well as their own

To make it configurable

I would word it to: > Members of one score group may be permitted to view the scoreboards of another score group, as well as their own To make it configurable

I think configuring which score group may see which scoreboards might be an overkill.
I now defined four access levels for every scoreboard.

I think configuring which score group may see which scoreboards might be an overkill. I now defined four access levels for every scoreboard.
First-time contributor

Yes, I think this is a nice way to implement it

Yes, I think this is a nice way to implement it
felix.gohla marked this conversation as resolved
@ -0,0 +59,4 @@
### Custom commands
It could also be possible to provide commands that tunnel a user to a jump host that is provided by the platform.
One disadvantage of this approach is that it only work for a limited number of OSs and can cause confusion.
Member

typo:

One disadvantage of this approach is that it only works for a limited number of OSs and can cause confusion.

typo: > One disadvantage of this approach is that it only work**s** for a limited number of OSs and can cause confusion.

Fixed.

Fixed.
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +68,4 @@
The platform must support the following (not exhaustive) list of challenge types:
* Interactive Challenges
* Isolated Challenges: Multiple independent instances of challenges can be started, once per account (i.e., team or user). These have their own state.
Member
  • It would be nice-to-have whatever way of reaching the challenge remain unchanged across restarts (i.e. IP-Addr, subdomain, port, etc.)
  • If submitting the final flag of such a challenge would stop the instance, it would be nice-to-have an option to only reduce the instance life time to e.g. 5mins so the user can choose to keep the instance running if need be
- It would be nice-to-have whatever way of reaching the challenge remain unchanged across restarts (i.e. IP-Addr, subdomain, port, etc.) - If submitting the final flag of such a challenge would stop the instance, it would be nice-to-have an option to only reduce the instance life time to e.g. 5mins so the user can choose to keep the instance running if need be

The first point is already covered: Random subdomains must be reproducible per account and the internal challenge IPs are the same of all accounts. I added an additional notice that the latter must apply also after a restart.

Regarding the second point: There is currently no requirement that challenges must be stopped after solving them. Is that an additional requirement?

The first point is already covered: Random subdomains must be reproducible per account and the internal challenge IPs are the same of all accounts. I added an additional notice that the latter must apply also after a restart. Regarding the second point: There is currently no requirement that challenges must be stopped after solving them. Is that an additional requirement?
Author
Owner

Stopping challenges, or at least handling handing in the last flag, should be a requirement.

Stopping challenges, or at least handling handing in the last flag, should be a requirement.
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +147,4 @@
* TODO: Updating the base image
### Scoring
Member

not sure where else to put this, so here it goes

  • it would be nice for users to be able to track which challenges they have solved even after the CTF has concluded
  • at least for organisers / admins it should be possible to view which chals have been solved by who and vice-versa
not sure where else to put this, so here it goes - it would be nice for users to be able to track which challenges they have solved even after the CTF has concluded - at least for organisers / admins it should be possible to view which chals have been solved by who and vice-versa

Regarding the first point: I added a requirement that CTFs are split into three time periods where the last ensures access to the same information as during the playtime.
Regarding the second point: I added a requirement for that next to the scoreboards.

Regarding the first point: I added a requirement that CTFs are split into three time periods where the last ensures access to the same information as during the playtime. Regarding the second point: I added a requirement for that next to the scoreboards.
Author
Owner

We discussed whether how the second point could be handled. We decided that this is a property of the score group (score gorup could have a property like disclose_solves which would trigger showing the solves for all challenges).

We discussed whether how the second point could be handled. We decided that this is a property of the score group (score gorup could have a property like `disclose_solves` which would trigger showing the solves for all challenges).
felix.gohla marked this conversation as resolved
@ -0,0 +14,4 @@
### Users and Authentication
Users must be able to log in to the platform via one of these (mutually exclusive) options:
First-time contributor

Maybe have this not exclusive for this, but rather keep it kind of open to allow for implementation of e.g. LTI or Flaghub

Maybe have this not exclusive for this, but rather keep it kind of open to allow for implementation of e.g. LTI or Flaghub
Member

another example would be OAuth2.0 in case login with ctftime would be desired

another example would be OAuth2.0 in case login with ctftime would be desired

I added at least to stress that the two listed mechanisms are not an exhaustive list.

@timo.neyer What exactly do you mean with keeping it open? Would you like support for having multiple mechanisms at the same time? I would rather delegate such complicated behavior to an IdP like Keycloak.

I added `at least` to stress that the two listed mechanisms are not an exhaustive list. @timo.neyer What exactly do you mean with keeping it open? Would you like support for having multiple mechanisms at the same time? I would rather delegate such complicated behavior to an IdP like Keycloak.
First-time contributor

I would just implement it with a bare minimum of abstraction so that it can be extended to whatever is needed. But It should, as you said, only be possible to have one login option per CTF. Everything else would result in too much work for too little gain

I would just implement it with a bare minimum of abstraction so that it can be extended to whatever is needed. But It should, as you said, only be possible to have one login option per CTF. Everything else would result in too much work for too little gain
felix.gohla marked this conversation as resolved
docs/README.md Outdated
@ -0,0 +193,4 @@
### Setup
The setup should be reasonably easy and straightforward. Having to debug multiple different applications and integrations to get started is a blocker for users.

Very similar to Hosting and Deployment (via Nils).

Very similar to Hosting and Deployment (via Nils).

I removed and/or rephrased duplicate content.

I removed and/or rephrased duplicate content.
felix.gohla marked this conversation as resolved
@ -0,0 +133,4 @@
The exact interface has yet to be defined as it must be common functionality subset across orchestrators (or provide an extension point).
Examples for orchestrators are a Kubernetes orchestrator or a Docker orchestrator.
As we want to allow re-using infrastructure for orchestration (from our experience, it is quite painful to manage multiple Kubernetes instances for different settings), orchestrators must be able to orchestrate for multiple CTFs / APIs.

Should it be possible to register multiple instances of one orchestrator type? E.g. spread the challenges across multiple kubernetes clusters or one cluster per CTF.

Should it be possible to register multiple instances of one orchestrator type? E.g. spread the challenges across multiple kubernetes clusters or one cluster per CTF.

I decided that it doesn't hurt to have multiple instances of the same orchestrator (e.g., mutliple k8s clusters).

I decided that it doesn't hurt to have multiple instances of the same orchestrator (e.g., mutliple k8s clusters).
Author
Owner

I am not sure whether it is a good idea to allow multiple orchestrators per CTF.
How would the API decide which orchestrator to choose for a challenge?

For now, I would leave this undefined and not explicitly allow multiple orchestrators, as we're not clear how different orchestrators can be. For instance, networking would have to be equal across all orchestrators.

I am not sure whether it is a good idea to allow multiple orchestrators per CTF. How would the API decide which orchestrator to choose for a challenge? For now, I would leave this undefined and not explicitly allow multiple orchestrators, as we're not clear how different orchestrators can be. For instance, networking would have to be equal across all orchestrators.
felix.gohla marked this conversation as resolved
@ -0,0 +180,4 @@
Larger setups for multiple hundred to thousands of participants may need another setup routine.
All components must be containerized, although containers may need access to host resources directly (such as the host's network).
It should be possible for the API to support multiple CTFs.

It should be possible to impose resource limits on CTFs (e.g. only very few instances for archived CTFs).

It should be possible to impose resource limits on CTFs (e.g. only very few instances for archived CTFs).

Added a sentence requiring resource limits.

Added a sentence requiring resource limits.
Author
Owner

We also added a sentence on the difference between team wide and CTF wide resource limits.

We also added a sentence on the difference between team wide and CTF wide resource limits.
felix.gohla marked this conversation as resolved
@ -0,0 +61,4 @@
#### Stepping
Challenges should be available in steps, i.e., if a challenge requires multiple steps to solve, the author should be able to “unlock” new descriptions after each step, depending on how much info the author wants to give.
Member

Isn't this basically multiple challenges that only unlock after solving the previous ones? I don't see how you'd detect that people got past a certain point to trigger the unlocking of new descriptions. A flag hand-in on the other hand would be a very easy trigger. Alternatively, you could have one challenge with multiple flags and unlock more descriptions after each flag hand-in. In any case, this requirement could be made a bit more specific as to what exactly the idea is here.

Isn't this basically multiple challenges that only unlock after solving the previous ones? I don't see how you'd detect that people got past a certain point to trigger the unlocking of new descriptions. A flag hand-in on the other hand would be a very easy trigger. Alternatively, you could have one challenge with multiple flags and unlock more descriptions after each flag hand-in. In any case, this requirement could be made a bit more specific as to what exactly the idea is here.
Member

I had assumed something similar to the way liveness and readiness probes work, where the author would specify a command to test whether the checkpoint has been reached

I had assumed something similar to the way liveness and readiness probes work, where the author would specify a command to test whether the checkpoint has been reached

I think what we had in mind is indeed releasing additional information after handing in a flag.
I added this as an example step to make it clearer. I'm not against other steps but I think flags are the only way to implement this without major overhead.
The pictured use case is educational: After solving part of the challenge, it would be possible to provide explanations of the previous step / hints for the next step.

I think what we had in mind is indeed releasing additional information after handing in a flag. I added this as an example step to make it clearer. I'm not against other steps but I think flags are the only way to implement this without major overhead. The pictured use case is educational: After solving part of the challenge, it would be possible to provide explanations of the previous step / hints for the next step.
Author
Owner

I had assumed something similar to the way liveness and readiness probes work
The liveliness probes approach would impose a very hard resource strain: starting 1000s of processes to check for every few seconds additionally to liveness is quite hard and nothing k8s or other orchestrators support.

If so, the challenge would need to have a tamper-proof way of sending events to the outside.

Changes the whole stepping thing to a "could".

> I had assumed something similar to the way liveness and readiness probes work The liveliness probes approach would impose a very hard resource strain: starting 1000s of processes to check for every few seconds additionally to liveness is quite hard and nothing k8s or other orchestrators support. If so, the challenge would need to have a tamper-proof way of sending events to the outside. Changes the whole stepping thing to a "could".
felix.gohla marked this conversation as resolved
@ -0,0 +58,4 @@
### Custom commands
It could also be possible to provide commands that tunnel a user to a jump host that is provided by the platform.
Member

Elaborating on the idea of a jump host: Why not have a jump host for users to connect to that is dual-homed, i.e. reachable from remote (either public or behind L3 VPN), as well as being connected to the challenge network? I believe this should be easier to implement than an L2 VPN.

Some points worth considering:

  1. providing access via SSH would allow easy tunneling, so that people can use their own tooling. The jump host itself wouldn't need any tooling in this case. Other tunneling solutions exist too, but SSH is the easiest to set up and has solid performance.
  2. in case another tunnel is needed as part of the challenge, participants may run into the kerberos double hop problem. This is a well-known problem with kerberos though, so I'd argue that this is acceptable.
Elaborating on the idea of a jump host: Why not have a jump host for users to connect to that is dual-homed, i.e. reachable from remote (either public or behind L3 VPN), as well as being connected to the challenge network? I believe this should be easier to implement than an L2 VPN. Some points worth considering: 1. providing access via SSH would allow easy tunneling, so that people can use their own tooling. The jump host itself wouldn't need any tooling in this case. Other tunneling solutions exist too, but SSH is the easiest to set up and has solid performance. 2. in case another tunnel is needed as part of the challenge, participants may run into the kerberos double hop problem. This is a well-known problem with kerberos though, so I'd argue that this is acceptable.

As far as I know, it is not easily possible to route ethernet frames through SSH. It would probably be possible to achieve it via tap devices but at that point, we could also use something like GRE.
Everything on Layer 3 can be achieved with wireguard, so a jump host is not really necessary, right?

As far as I know, it is not easily possible to route ethernet frames through SSH. It would probably be possible to achieve it via tap devices but at that point, we could also use something like GRE. Everything on Layer 3 can be achieved with wireguard, so a jump host is not really necessary, right?
Author
Owner

@toni.poredda n.b.: SSH only supports TCP tunneling.

@toni.poredda n.b.: SSH only supports TCP tunneling.
Author
Owner

FYI, merging now but feel free to open issues for discussion.

FYI, merging now but feel free to open issues for discussion.
felix.gohla deleted branch docs/requirements 2026-02-22 16:12:35 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kraftwerk-ctf/kraftwerk!1
No description provided.