Skip to content

Conversation

@davepacheco
Copy link
Collaborator

This reverts commit 1019643.

#936 did pass all checks, but that was before sync'ing up with #937 (which also passed all tests). Together, there's a logical conflict that wasn't caught by git/GitHub. I'm reverting #936 until I can figure out the right fix for this.

@davepacheco davepacheco enabled auto-merge (squash) April 19, 2022 17:28
@davepacheco
Copy link
Collaborator Author

I believe the problem is that:

  • use the correct Silo for resource lookups #937 added an omicron.polar policy rule saying that users can "read" their own Silo. I think the reason was that organization_create() attempts to create an Organization in your Silo. If you can't read your own Silo, the authz subsystem turns this into a 404. It's like trying to create a Project inside an Organization that you don't have access to -- you have to get a 404 saying the Organization doesn't exist. If we allow you to "read" your own Silo, then this becomes a 403 instead (which is what we want).
  • authz: silo endpoints #936 added an "unauthorized.rs" check for the default Silo and assumes that unprivileged users can't read it.

I can see a couple of options for fixing this:

  1. Say that users can read their own Silo. The only (immediate) problem is that the "unauthorized" test needs to create some other Silo for unprivileged users to check. I think this should be possible so I'm going to explore that.
  2. Say that users cannot read their own Silo. Fix the 404 above by instead checking for CreateChild on the Fleet. I don't like this because it puts policy into the code doing the authz check. That code should be able to say what it's really doing, not some inferred thing, and leave the policy to the Polar document and role assignments.
  3. Say that users cannot read their own Silo, but fix the 404 above by using a custom implementation of the AuthorizedResource trait that returns a 403 rather than a 404. This essentially says that one's own Silo is visible even though you can't read it. That's a little weird because it's unlike all other resources, but it's not the worst. I'm also not sure how to do it because the current impl of AuthorizedResource is a blanket impl shared with a lot of other types.

@davepacheco
Copy link
Collaborator Author

As happens with disturbing frequency, GitHub has simply not kicked off some of the required builds for this change:

Screen Shot 2022-04-19 at 11 25 16 AM

I expect the real fix, #947, will wind up landing sooner.

@david-crespo
Copy link
Contributor

It's the job deduper. Drives me nuts constantly. What if we just turn that off?

@davepacheco
Copy link
Collaborator Author

It's the job deduper. Drives me nuts constantly. What if we just turn that off?

Ugh! How can you tell? Are you able to confirm it? I thought usually when it marks something "skipped" then GitHub knows not to expect the check.

@david-crespo
Copy link
Contributor

@davepacheco
Copy link
Collaborator Author

Closing -- the real fix was done sooner (#947).

auto-merge was automatically disabled April 19, 2022 19:22

Pull request was closed

leftwo pushed a commit that referenced this pull request Oct 4, 2023
Crucible updates
    all Crucible connections should set TCP_NODELAY (#983)
    Use a fixed size for tag and nonce (#957)
    Log crucible opts on start, order crutest options (#974)
    Lock the Downstairs less (#966)
    Cache dirty flag locally, reducing SQLite operations (#970)
    Make stats mutex synchronous (#961)
    Optimize requeue during flow control conditions (#962)
    Update Rust crate base64 to 0.21.4 (#950)
    Do less in control (#949)
    Fix --flush-per-blocks (#959)
    Fast dependency checking (#916)
    Update actions/checkout action to v4 (#960)
    Use `cargo hakari` for better workspace deps (#956)
    Update actions/checkout digest to 8ade135 (#939)
    Cache block size in Guest (#947)
    Update Rust crate ringbuffer to 0.15.0 (#954)
    Update Rust crate toml to 0.8 (#955)
    Update Rust crate reedline to 0.24.0 (#953)
    Update Rust crate libc to 0.2.148 (#952)
    Update Rust crate indicatif to 0.17.7 (#951)
    Remove unused async (#943)
    Use a synchronous mutex for bw/iop_tokens (#946)
    Make flush ID non-locking (#945)
    Use `oneshot` channels instead of `mpsc` for notification (#918)
    Use a strong type for upstairs negotiation (#941)
    Add a "dynamometer" option to crucible-downstairs (#931)
    Get new work and active count in one lock (#938)
    A bunch of misc test cleanup stuff (#937)
    Wait for a snapshot to finish on all downstairs (#920)
    dsc and clippy cleanup. (#935)
    No need to sort ackable_work (#934)
    Use a strong type for repair ID (#928)
    Keep new jobs sorted (#929)
    Remove state_count function on Downstairs (#927)
    Small cleanup to IOStateCount (#932)
    let cmon and IOStateCount use ClientId (#930)
    Fast return for zero length IOs (#926)
    Use a strong type for client ID (#925)
    A few Crucible Agent fixes (#922)
    Use a newtype for `JobId` (#919)
    Don't pass MutexGuard into functions (#917)
    Crutest updates, rename tests, new options (#911)

Propolis updates
    Update tungstenite crates to 0.20
    Use `strum` crate for enum-related utilities
    Wire up bits for CPUID customization
    PHD: improve artifact store (#529)
    Revert abort-on-panic in 'dev' cargo profile
leftwo added a commit that referenced this pull request Oct 5, 2023
Crucible updates
    all Crucible connections should set TCP_NODELAY (#983)
    Use a fixed size for tag and nonce (#957)
    Log crucible opts on start, order crutest options (#974)
    Lock the Downstairs less (#966)
    Cache dirty flag locally, reducing SQLite operations (#970)
    Make stats mutex synchronous (#961)
    Optimize requeue during flow control conditions (#962)
    Update Rust crate base64 to 0.21.4 (#950)
    Do less in control (#949)
    Fix --flush-per-blocks (#959)
    Fast dependency checking (#916)
    Update actions/checkout action to v4 (#960)
    Use `cargo hakari` for better workspace deps (#956)
    Update actions/checkout digest to 8ade135 (#939)
    Cache block size in Guest (#947)
    Update Rust crate ringbuffer to 0.15.0 (#954)
    Update Rust crate toml to 0.8 (#955)
    Update Rust crate reedline to 0.24.0 (#953)
    Update Rust crate libc to 0.2.148 (#952)
    Update Rust crate indicatif to 0.17.7 (#951)
    Remove unused async (#943)
    Use a synchronous mutex for bw/iop_tokens (#946)
    Make flush ID non-locking (#945)
    Use `oneshot` channels instead of `mpsc` for notification (#918)
    Use a strong type for upstairs negotiation (#941)
    Add a "dynamometer" option to crucible-downstairs (#931)
    Get new work and active count in one lock (#938)
    A bunch of misc test cleanup stuff (#937)
    Wait for a snapshot to finish on all downstairs (#920)
    dsc and clippy cleanup. (#935)
    No need to sort ackable_work (#934)
    Use a strong type for repair ID (#928)
    Keep new jobs sorted (#929)
    Remove state_count function on Downstairs (#927)
    Small cleanup to IOStateCount (#932)
    let cmon and IOStateCount use ClientId (#930)
    Fast return for zero length IOs (#926)
    Use a strong type for client ID (#925)
    A few Crucible Agent fixes (#922)
    Use a newtype for `JobId` (#919)
    Don't pass MutexGuard into functions (#917)
    Crutest updates, rename tests, new options (#911)

Propolis updates
    Update tungstenite crates to 0.20
    Use `strum` crate for enum-related utilities
    Wire up bits for CPUID customization
    PHD: improve artifact store (#529)
    Revert abort-on-panic in 'dev' cargo profile

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
leftwo pushed a commit that referenced this pull request Sep 23, 2025
Crucible changes are:
update to latest `vergen` (#1770)
Update rand dependencies, and fallout from that. (#1764)
[crucible-downstairs] migrate to API traits (#1768)
[crucible-agent] migrate to API trait (#1766)
[crucible-pantry] migrate to API trait (#1767)
Add back job delays in the downstairs with the --lossy flag (#1761)

Propolis changes are:
Crucible update plus a few other dependency changes. (#948)
[2/n] [propolis-server] switch to API trait (#946)
[1/n] add a temporary indent to propolis server APIs (#945)
Handle Intel CPUID leaves 4 and 18h, specialize CPUID for VM shape (#941)
Increase viona receive queue length to 2048 (#935)
Expand viona header pad to account for options (#937)
fix linux p9fs multi message reads (#932)
add a D script to report VMs' CPUID queries (#934)
Update GH actions
Re-enable viona packet data loaning
leftwo added a commit that referenced this pull request Sep 26, 2025
Crucible changes are:
update to latest `vergen` (#1770)
Update rand dependencies, and fallout from that. (#1764)
[crucible-downstairs] migrate to API traits (#1768) [crucible-agent]
migrate to API trait (#1766)
[crucible-pantry] migrate to API trait (#1767)
Add back job delays in the downstairs with the --lossy flag (#1761)

Propolis changes are:
Crucible update plus a few other dependency changes. (#948) [2/n]
[propolis-server] switch to API trait (#946) [1/n] add a temporary
indent to propolis server APIs (#945) Handle Intel CPUID leaves 4 and
18h, specialize CPUID for VM shape (#941) Increase viona receive queue
length to 2048 (#935) Expand viona header pad to account for options
(#937) fix linux p9fs multi message reads (#932)
add a D script to report VMs' CPUID queries (#934) Update GH actions
Re-enable viona packet data loaning

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
Co-authored-by: Sean Klein <sean@oxide.computer>
Co-authored-by: Rain <rain@oxide.computer>
Co-authored-by: John Gallagher <john@oxidecomputer.com>
Co-authored-by: iliana etaoin <iliana@oxide.computer>
Co-authored-by: Sean Klein <sean@oxidecomputer.com>
Co-authored-by: Alex Plotnick <alex@oxidecomputer.com>
Co-authored-by: David Pacheco <dap@oxidecomputer.com>
Co-authored-by: Andrew J. Stone <andrew@oxidecomputer.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants