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

Change default of refresh token format #2406

Merged
merged 4 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion uaa/src/main/webapp/WEB-INF/spring/oauth-endpoints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
<property name="activeKeyId" value="${jwt.token.policy.activeKeyId:#{null}}"/>
<property name="jwtRevocable" value="${jwt.token.revocable:false}"/>
<property name="refreshTokenFormat"
value="${jwt.token.refresh.format:#{T(org.cloudfoundry.identity.uaa.oauth.token.TokenConstants.TokenFormat).JWT.getStringValue()}}"/>
value="${jwt.token.refresh.format:#{T(org.cloudfoundry.identity.uaa.oauth.token.TokenConstants.TokenFormat).OPAQUE.getStringValue()}}"/>
<property name="refreshTokenUnique" value="${jwt.token.refresh.unique:false}"/>
<property name="refreshTokenRotate" value="${jwt.token.refresh.rotate:false}"/>
</bean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.request;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@TestPropertySource(properties = {"uaa.url=https://localhost:8080/uaa"})
@TestPropertySource(properties = {"uaa.url=https://localhost:8080/uaa", "jwt.token.refresh.format=jwt"})
public class TokenMvcMockTests extends AbstractTokenMockMvcTests {
private String BADSECRET = "badsecret";
protected RandomValueStringGenerator generator = new RandomValueStringGenerator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

@DisplayName("Uaa Token Services Tests")
@DefaultTestContext
@TestPropertySource(properties = {"uaa.url=https://uaa.some.test.domain.com:555/uaa"})
@TestPropertySource(properties = {"uaa.url=https://uaa.some.test.domain.com:555/uaa", "jwt.token.refresh.format=jwt"})
class UaaTokenServicesTests {
@Autowired
private UaaTokenServices tokenServices;
Expand Down
6 changes: 5 additions & 1 deletion uaa/src/test/resources/integration_test_properties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ LOGIN_SECRET: loginsecret
jwt:
token:
signing-key: tokenKey

revocable: false
refresh:
format: opaque
rotate: false
unique: false
login:
serviceProviderKey: |
-----BEGIN RSA PRIVATE KEY-----
Expand Down