diff --git a/pkg/profiles/profileConfig.go b/pkg/profiles/profileConfig.go index 8b12f576..1c5eac5d 100644 --- a/pkg/profiles/profileConfig.go +++ b/pkg/profiles/profileConfig.go @@ -26,6 +26,7 @@ type ProfileConfig struct { Attributes map[string]interface{} `json:"attributes"` // Flexible map of additional attributes CreatedAt time.Time `json:"createdAt"` // Timestamp for profile creation UpdatedAt time.Time `json:"updatedAt"` // Timestamp for last profile update + Version string `json:"version"` // profile version } // NewProfileStore creates a new profile store with flexible attributes and timestamps @@ -48,6 +49,7 @@ func NewProfileStore(newStore NewStoreInterface, profileName string, endpoint st Attributes: make(map[string]interface{}), // Empty map for flexible attributes CreatedAt: time.Now(), // Set creation time UpdatedAt: time.Now(), // Set initial update time + Version: URNNamespaceTemplate, // Set profile version to URN-based namespace template }, } return p, nil diff --git a/pkg/profiles/storeFile.go b/pkg/profiles/storeFile.go index 9a3cdedf..acb7095c 100644 --- a/pkg/profiles/storeFile.go +++ b/pkg/profiles/storeFile.go @@ -28,6 +28,7 @@ type FileMetadata struct { ProfileName string `json:"profile_name"` CreatedAt string `json:"created_at"` EncryptionAlg string `json:"encryption_alg"` + Version string `json:"version"` } // Generates a safe, hashed filename from namespace and key @@ -213,6 +214,7 @@ func (f *FileStore) SaveMetadata(profileName string) error { ProfileName: profileName, CreatedAt: time.Now().Format(time.RFC3339), EncryptionAlg: "AES-256-GCM", + Version: URNNamespaceTemplate, } data, err := json.MarshalIndent(metadata, "", " ")