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

bug: Proxy APIExport identity validation is incorrect. #2918

Open
mjudeikis opened this issue Mar 24, 2023 · 4 comments
Open

bug: Proxy APIExport identity validation is incorrect. #2918

mjudeikis opened this issue Mar 24, 2023 · 4 comments
Labels
area/apiexports kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@mjudeikis
Copy link
Contributor

Describe the bug

When creating "proxy" apiExport (root to custom workspace), I made a mistake with bootstrapper and ended up with APIExport as below:

[mjudeikis@unknown2 faros]$ k get apiexport compute.faros.sh -o yaml
apiVersion: apis.kcp.io/v1alpha1               
kind: APIExport                                
metadata:                                      
  annotations:                                 
    kcp.io/cluster: nu66to0aor944bum           
    kcp.io/path: root:faros:service:controllers
  creationTimestamp: "2023-03-24T09:46:07Z"
  generation: 8                            
  name: compute.faros.sh                   
  resourceVersion: "8573"                  
  uid: fc7c3bae-63bf-42da-acab-aab8782357ef
spec:                       
  identity:                 
    secretRef:                                                                                                                                      
      name: compute.faros.sh                                                                                                                        
      namespace: kcp-system                                                                                                                         
  permissionClaims:                                                                                                                                 
  - all: true                                                                                                                                       
    group: workload.kcp.io                                                                                                                          
    identityHash: random-prefix-97d7c56385241358fbd0c4d0e461e15ba1449b1a7fbbb88112cd094e10eb2eb4-random-string-suffix
    resource: synctargets                     
status:                                       
  conditions:                                 
  - lastTransitionTime: "2023-03-24T09:46:07Z"                                                                                                      
    status: "True"                                                                                                                                  
    type: IdentityValid                                                                                                                             
  - lastTransitionTime: "2023-03-24T09:46:07Z"                                                                                                      
    status: "True"                                                                                                                                  
    type: VirtualWorkspaceURLsReady                                                                                                                 
  identityHash: 2baf09807a4c861b04815ed6cd2f773ad1c819901fe21133f3c5d80489fce3a2                                                                    
  virtualWorkspaces:                                                                                                                                
  - url: https://kcp.dev.faros.sh:443/services/apiexport/nu66to0aor944bum/compute.faros.sh

And still got valid status, where identityHash is not valid.

Steps To Reproduce

  1. Create APIExport for 3rd party resource.
  2. Add the wrong identityhash
  3. observe resources

Expected Behaviour

Fail on identityhash validation

Additional Context

No response

@mjudeikis mjudeikis added the kind/bug Categorizes issue or PR as related to a bug. label Mar 24, 2023
@ncdc
Copy link
Member

ncdc commented Mar 27, 2023

Is this a duplicate of #2152?

@mjudeikis
Copy link
Contributor Author

Need to read code to understand better :/ might be similar or same. Not clear from the first glimpse. WIll try to clarify bit later

@embik embik added area/apiexports priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jul 6, 2023
@kcp-ci-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kcp-ci-bot kcp-ci-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 16, 2024
@kcp-ci-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kcp-ci-bot kcp-ci-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiexports kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
Status: Backlog
Development

No branches or pull requests

4 participants