Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAT Model, Act I #330

Open
1 of 5 tasks
lukasjuhrich opened this issue Aug 31, 2019 · 4 comments
Open
1 of 5 tasks

NAT Model, Act I #330

lukasjuhrich opened this issue Aug 31, 2019 · 4 comments
Assignees
Labels
🔨 db-schema Things that touch the DB schema and probably require a migration. topic:nat

Comments

@lukasjuhrich
Copy link
Collaborator

lukasjuhrich commented Aug 31, 2019

Child of #73.

Goal

The schema's hard relations plus constraints (not including constraint triggers which call functions!) should be implemented as intended in shreyders POC:
NAT Schema
Tests are required. Target branch is nat_schema.

Tasks

  • Consolidate Changes from 72c0fc7
  • Include remarks from @sebschrader made in private conversation (something something ISID-Information is missing)
  • Add a primitive Test and a suitable test fixture
  • Add tests for every constraint
  • Add tests for Delete cascades
@lukasjuhrich lukasjuhrich self-assigned this Aug 31, 2019
@lukasjuhrich lukasjuhrich added topic:nat 🔨 db-schema Things that touch the DB schema and probably require a migration. labels Aug 31, 2019
@lukasjuhrich lukasjuhrich mentioned this issue Aug 31, 2019
2 tasks
lukasjuhrich added a commit that referenced this issue Aug 31, 2019
lukasjuhrich added a commit that referenced this issue Aug 31, 2019
This in particular relates to setting correct cascades.

Refs #330
lukasjuhrich added a commit that referenced this issue Aug 31, 2019
lukasjuhrich added a commit that referenced this issue Aug 31, 2019
lukasjuhrich added a commit that referenced this issue Aug 31, 2019
@lukasjuhrich
Copy link
Collaborator Author

We have to cover the following use cases:

  • Legacy/Wired: Access-Switch is configured to ask Hades, Hades responds with 666 or the /Dorm-VLAN/.
  • NAT/Wired: Access-Switch is configured to ask Hades, Hades responds with 666 or the /User-VLAN/ (corresponding to his ISID)
  • NAT/Wireless: WLAN-Controller gets 802.1X auth (⇒User.login), needs corresponding ISID(?)

@sebschrader
Copy link
Member

Our current and future switches, access points, and WLAN controllers don't support dynamic I-SID assignments via RADIUS. Only VLANs can be assigned dynamically via RADIUS. VLANs can be associated statically with I-SIDs on the switches however. So users can be indirectly assigned dynamically to an I-SID via RADIUS through the use of VLANs.

The VLANs have only local significance on the particular switch. So the VLAN ID to use depends on the NAS (Network Access Server) in RADIUS parlance, the user tries to connect to. We need at least a wired VLAN ID on their home switch and wireless VLAN ID on the WLAN controller for each user.

In summary:

  • Each user has a layer 2 domain
  • The L2 Domain has an I-SID associated with it
  • The L2 Domain has multiple NAS-specific VLAN IDs

lukasjuhrich added a commit that referenced this issue Sep 18, 2019
This also includes the implicit relationship
`Translation → InsideNetwork`.

Also, make some of the redundant / conflicting `nat_domain`
relationships `viewonly`

Refs #330
@lukasjuhrich
Copy link
Collaborator Author

lukasjuhrich commented Sep 21, 2019

I would argue that not every user „has“ a layer 2 domain – instead, layer 2 domains (internal_network) can be associated to a user. Remember that only a subset of our users will join the new network model, others may still be oblivious to that information.

Proposition

Okay, so I propose the following changes:

  • Add a isid(int isid, string? name) relation representing the pool of all available isids
  • Add an FKey internal_network.isid → isid.isid
  • Add a translation isid_wired_vlan(int isid, int nas_id, something vlan) (isid, nas primary, FKey isid → isid.isid)
  • Add a relation isid_wireless_vlan(int isid, something vlan) (primary&&fkey isid, vlan unique)

Left to decide

  • Do we want a constraint that every isid must have a complete set of mappings with every nas?
  • Do we want hard FKeys to the vlan relation? The latter is currently used for the per-dorm-vlans only, now the „NAT wired“ and „NAT wireless“ use cases would be added
  • If yes, do we want a constraint checking that each vlan is exclusively associated to either
    • a subnet (legacy-model) or
    • an isid_wired_vlan (nat-model) or
    • an isid_wireless_vlan (nat-model)?

I'd argue that the third point is overkill, but the second might be useful. By having nullable possibly empty backrefs VLAN.subnets, VLAN.isids, the UI can easily inform about which „kind“ of vlan this is (see #334).

@lukasjuhrich
Copy link
Collaborator Author

lukasjuhrich commented Sep 22, 2019

Since I repeatedly lost the overview about which checks etc. to implement, I reconstructed the feature list of the model in this .org-gist (update: see this expanded PDF version).
Also interesting for #331.

I'll try to split those features up to get a precise definition of what has to be done for an initial deployment of the (unfinished) model.

@lukasjuhrich lukasjuhrich mentioned this issue Oct 4, 2019
5 tasks
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
This in particular relates to setting correct cascades.

Refs agdsn#330
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
lukasjuhrich added a commit to lukasjuhrich/pycroft that referenced this issue Oct 6, 2019
This also includes the implicit relationship
`Translation → InsideNetwork`.

Also, make some of the redundant / conflicting `nat_domain`
relationships `viewonly`

Refs agdsn#330
@lukasjuhrich lukasjuhrich mentioned this issue Jul 26, 2020
@lukasjuhrich lukasjuhrich mentioned this issue Feb 12, 2021
4 tasks
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
This in particular relates to setting correct cascades.

Refs #330
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
lukasjuhrich added a commit that referenced this issue Jan 22, 2022
This also includes the implicit relationship
`Translation → InsideNetwork`.

Also, make some of the redundant / conflicting `nat_domain`
relationships `viewonly`

Refs #330
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
This in particular relates to setting correct cascades.

Refs #330
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
This also includes the implicit relationship
`Translation → InsideNetwork`.

Also, make some of the redundant / conflicting `nat_domain`
relationships `viewonly`

Refs #330
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
This in particular relates to setting correct cascades.

Refs #330
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
lukasjuhrich added a commit that referenced this issue Sep 6, 2023
This also includes the implicit relationship
`Translation → InsideNetwork`.

Also, make some of the redundant / conflicting `nat_domain`
relationships `viewonly`

Refs #330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 db-schema Things that touch the DB schema and probably require a migration. topic:nat
Projects
None yet
Development

No branches or pull requests

2 participants