mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-14 14:22:06 +00:00
feat: validate workload-bound result credentials
This commit is contained in:
@@ -55,6 +55,7 @@ type WorkloadBinding struct {
|
||||
ServiceAcct string
|
||||
PodUID string
|
||||
GameServerUID string
|
||||
AllocationID string
|
||||
MatchID string
|
||||
ServerID string
|
||||
}
|
||||
@@ -169,7 +170,7 @@ func RatingEligible(receipt ResultReceipt) bool {
|
||||
}
|
||||
|
||||
func validateBinding(binding WorkloadBinding) error {
|
||||
if binding.Issuer == "" || binding.Audience == "" || binding.Namespace == "" || binding.ServiceAcct == "" || binding.PodUID == "" || binding.GameServerUID == "" || binding.MatchID == "" || binding.ServerID == "" {
|
||||
if binding.Issuer == "" || binding.Audience == "" || binding.Namespace == "" || binding.ServiceAcct == "" || binding.PodUID == "" || binding.GameServerUID == "" || binding.AllocationID == "" || binding.MatchID == "" || binding.ServerID == "" {
|
||||
return ErrResultBinding
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user