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

chore(dependencies): Autobump fiatVersion #1858

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.netflix.spinnaker.fiat.shared.FiatPermissionEvaluator;
import com.netflix.spinnaker.fiat.shared.FiatService;
import com.netflix.spinnaker.fiat.shared.FiatStatus;
import com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall;
import com.netflix.spinnaker.security.AuthenticatedRequest;
import io.micrometer.core.annotation.Counted;
import java.util.Collection;
Expand Down Expand Up @@ -59,7 +60,7 @@ public Collection<? extends GrantedAuthority> login(String userid) {

return AuthenticatedRequest.allowAnonymous(
() -> {
getFiatServiceForLogin().loginUser(userid, "");
Retrofit2SyncCall.execute(getFiatServiceForLogin().loginUser(userid));
return resolveAuthorities(userid);
});
}
Expand All @@ -73,7 +74,7 @@ public Collection<? extends GrantedAuthority> loginWithRoles(

return AuthenticatedRequest.allowAnonymous(
() -> {
getFiatServiceForLogin().loginWithRoles(userid, roles);
Retrofit2SyncCall.execute(getFiatServiceForLogin().loginWithRoles(userid, roles));
return resolveAuthorities(userid);
});
}
Expand All @@ -84,7 +85,7 @@ public void logout(String userid) {
return;
}

getFiatServiceForLogin().logoutUser(userid);
Retrofit2SyncCall.execute(getFiatServiceForLogin().logoutUser(userid));
permissionEvaluator.invalidatePermission(userid);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.netflix.spinnaker.kork.core.RetrySupport;
import com.netflix.spinnaker.kork.exceptions.SpinnakerException;
import com.netflix.spinnaker.kork.exceptions.SystemException;
import com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerServerException;
import com.netflix.spinnaker.security.AuthenticatedRequest;
Expand Down Expand Up @@ -78,9 +79,7 @@ public void login(final String userId) {
try {
AuthenticatedRequest.allowAnonymous(
() -> {
// TODO(jvz): FiatService::loginUser should have only one parameter as Retrofit no
// longer requires this body parameter
getFiatServiceForLogin().loginUser(userId, "");
Retrofit2SyncCall.execute(getFiatServiceForLogin().loginUser(userId));
permissionEvaluator.invalidatePermission(userId);
return null;
});
Expand All @@ -95,7 +94,7 @@ public void loginWithRoles(final String userId, final Collection<String> roles)
try {
AuthenticatedRequest.allowAnonymous(
() -> {
getFiatServiceForLogin().loginWithRoles(userId, roles);
Retrofit2SyncCall.execute(getFiatServiceForLogin().loginWithRoles(userId, roles));
permissionEvaluator.invalidatePermission(userId);
return null;
});
Expand All @@ -108,7 +107,7 @@ public void loginWithRoles(final String userId, final Collection<String> roles)
public void logout(String userId) {
if (fiatStatus.isEnabled()) {
try {
getFiatServiceForLogin().logoutUser(userId);
Retrofit2SyncCall.execute(getFiatServiceForLogin().logoutUser(userId));
permissionEvaluator.invalidatePermission(userId);
} catch (SpinnakerServerException e) {
throw UpstreamBadRequest.classifyError(e);
Expand All @@ -119,7 +118,7 @@ public void logout(String userId) {
public void sync() {
if (fiatStatus.isEnabled()) {
try {
getFiatServiceForLogin().sync(List.of());
Retrofit2SyncCall.execute(getFiatServiceForLogin().sync(List.of()));
} catch (SpinnakerServerException e) {
throw UpstreamBadRequest.classifyError(e);
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
enablePublishing=false
fiatVersion=1.52.0
fiatVersion=1.53.0
includeProviders=basic,iap,ldap,oauth2,saml,x509
korkVersion=7.247.0
kotlinVersion=1.6.21
Expand Down
Loading