Introduce APEOverride for Bearer-token #225

Merged
fyrchik merged 2 commits from aarifullin/frostfs-sdk-go:feat/beartoken_ape into master 2024-05-31 12:14:44 +00:00
Member
  • Update go.mod;
  • Resolve conflicts for packages;
  • Fix client's apemanager methods.
  • Move apemanager to ape
  • Introduce APEOverride for Bearer-token
* Update go.mod; * Resolve conflicts for packages; * Fix client's `apemanager` methods. * Move `apemanager` to `ape` * Introduce `APEOverride` for `Bearer`-token
aarifullin force-pushed feat/beartoken_ape from ecf35f020f to ef886376f6 2024-05-30 08:30:48 +00:00 Compare
aarifullin requested review from storage-core-committers 2024-05-30 08:31:01 +00:00
aarifullin requested review from storage-core-developers 2024-05-30 08:31:41 +00:00
aarifullin requested review from storage-services-committers 2024-05-30 08:32:01 +00:00
aarifullin requested review from storage-services-developers 2024-05-30 08:32:02 +00:00
aarifullin force-pushed feat/beartoken_ape from ef886376f6 to e28536b81b 2024-05-30 08:45:29 +00:00 Compare
aarifullin force-pushed feat/beartoken_ape from e28536b81b to 0082f1f132 2024-05-30 08:50:18 +00:00 Compare
aarifullin force-pushed feat/beartoken_ape from 0082f1f132 to b08e5ad989 2024-05-30 08:58:10 +00:00 Compare
fyrchik approved these changes 2024-05-30 15:30:22 +00:00
@ -84,0 +139,4 @@
}
for i := range lhs.GetChains() {
if !reflect.DeepEqual(lhs.GetChains()[i], rhs.GetChains()[i]) {
Owner

If we already use deep equal, why not use it on lhs and rhs?

If we already use deep equal, why not use it on `lhs` and `rhs`?
Author
Member

Sorry, this is the flavor of the previous implementation. Fixed

Sorry, this is the flavor of the previous implementation. Fixed
fyrchik marked this conversation as resolved
aarifullin force-pushed feat/beartoken_ape from b08e5ad989 to 4f5bad8367 2024-05-30 15:35:59 +00:00 Compare
fyrchik approved these changes 2024-05-30 18:20:58 +00:00
acid-ant approved these changes 2024-05-31 07:40:37 +00:00
dkirillov reviewed 2024-05-31 09:59:27 +00:00
bearer/bearer.go Outdated
@ -39,0 +106,4 @@
apeOverride.SetTarget(c.Target.ToV2())
chains := make([]*apeV2.Chain, len(c.Chains))
for i := range c.Chains {
chains[i] = new(apeV2.Chain)
Member

It seems this is unnecessary because of the next line

It seems this is unnecessary because of the next line
Author
Member

True. Fixed

True. Fixed
dkirillov marked this conversation as resolved
bearer/bearer.go Outdated
@ -72,6 +151,16 @@ func (b *Token) readFromV2(m acl.BearerToken, checkFieldPresence bool) error {
return errors.New("missing token lifetime")
}
b.apeOverride = nil
Member

Why do we need this?
If we want make sure there is not old data then probably we need the same for other fields. Currently this isn't fully consistent I suppose

Why do we need this? If we want make sure there is not old data then probably we need the same for other fields. Currently this isn't fully consistent I suppose
Author
Member

Okay, I remate in old manner with flag and made consistent with other fields

Okay, I remate in old manner with flag and made consistent with other fields
dkirillov marked this conversation as resolved
bearer/bearer.go Outdated
@ -217,0 +314,4 @@
b.apeOverride = v
}
func (b *Token) APEOverride() *APEOverride {
Member

Do we need comment for this method?

Do we need comment for this method?
Author
Member

Added

Added
dkirillov marked this conversation as resolved
aarifullin force-pushed feat/beartoken_ape from 4f5bad8367 to 7596f110da 2024-05-31 11:23:22 +00:00 Compare
aarifullin requested review from acid-ant 2024-05-31 11:25:38 +00:00
aarifullin requested review from fyrchik 2024-05-31 11:25:39 +00:00
dkirillov approved these changes 2024-05-31 11:38:27 +00:00
fyrchik merged commit 717a7d00ef into master 2024-05-31 12:14:44 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#225
No description provided.