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

Prevent Object Nesting in Agent Registration #311

Closed
Tracked by #241
vikman90 opened this issue Nov 18, 2024 · 1 comment · Fixed by #312
Closed
Tracked by #241

Prevent Object Nesting in Agent Registration #311

vikman90 opened this issue Nov 18, 2024 · 1 comment · Fixed by #312
Assignees
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/bug Bug issue

Comments

@vikman90
Copy link
Member

vikman90 commented Nov 18, 2024

Parent Issue: #241

Currently, the body of a registration request is:

{
    "agent": {
        "groups": [],
        "host": {
            "architecture": "x86_64",
            "hostname": "Rocket",
            "ip": [
                "172.28.54.98",
                "fe80::215:5dff:feb2:94ca"
            ],
            "os": {
                "name": "Ubuntu",
                "platform": "Linux"
            }
        },
        "id": "7b565a01-8df4-4943-9fb1-6d347ab21853",
        "key": "IGnRhLW9pbhecU2PyMo9hyTbzAUgPaqj",
        "name": "dummy",
        "type": "Endpoint",
        "version": "5.0.0"
    }
}

We should not nest the fields into agent.

Expected request body

{
    "groups": [],
    "host": {
        "architecture": "x86_64",
        "hostname": "Rocket",
        "ip": [
            "172.28.54.98",
            "fe80::215:5dff:feb2:94ca"
        ],
        "os": {
            "name": "Ubuntu",
            "platform": "Linux"
        }
    },
    "id": "7b565a01-8df4-4943-9fb1-6d347ab21853",
    "key": "IGnRhLW9pbhecU2PyMo9hyTbzAUgPaqj",
    "name": "dummy",
    "type": "Endpoint",
    "version": "5.0.0"
}
@vikman90 vikman90 added mvp Minimum Viable Product refinement level/task Task issue type/bug Bug issue module/agent labels Nov 18, 2024
@wazuhci wazuhci moved this to Backlog in Release 5.0.0 Nov 18, 2024
@vikman90 vikman90 self-assigned this Nov 18, 2024
@vikman90 vikman90 linked a pull request Nov 18, 2024 that will close this issue
@vikman90
Copy link
Member Author

@wazuhci wazuhci moved this from Backlog to In progress in Release 5.0.0 Nov 18, 2024
@wazuhci wazuhci moved this from In progress to Done in Release 5.0.0 Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/bug Bug issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant