Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KEYCLOAK-1542 - Server Info page extended by info about DB and MongoDB.
Functional test for /serverinfo REST endpoint added.
- Loading branch information
Showing
10 changed files
with
776 additions
and
444 deletions.
There are no files selected for viewing
399 changes: 226 additions & 173 deletions
399
...s/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
connections/jpa/src/main/java/org/keycloak/connections/jpa/JpaConnectionProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package org.keycloak.connections.jpa; | ||
|
||
import org.keycloak.provider.ProviderFactory; | ||
import org.keycloak.provider.MonitorableProviderFactory; | ||
|
||
/** | ||
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> | ||
*/ | ||
public interface JpaConnectionProviderFactory extends ProviderFactory<JpaConnectionProvider> { | ||
public interface JpaConnectionProviderFactory extends MonitorableProviderFactory<JpaConnectionProvider> { | ||
|
||
} |
410 changes: 219 additions & 191 deletions
410
...o/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...ns/mongo/src/main/java/org/keycloak/connections/mongo/MongoConnectionProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package org.keycloak.connections.mongo; | ||
|
||
import org.keycloak.provider.ProviderFactory; | ||
import org.keycloak.provider.MonitorableProviderFactory; | ||
|
||
/** | ||
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> | ||
*/ | ||
public interface MongoConnectionProviderFactory extends ProviderFactory<MongoConnectionProvider> { | ||
public interface MongoConnectionProviderFactory extends MonitorableProviderFactory<MongoConnectionProvider> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
model/api/src/main/java/org/keycloak/provider/MonitorableProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.keycloak.provider; | ||
|
||
/** | ||
* Provider factory for provider which is monitorable. It means some info about it can be shown on "Server Info" page or accessed over Operational monitoring endpoint. | ||
* | ||
* @author Vlastimil Elias (velias at redhat dot com) | ||
*/ | ||
public interface MonitorableProviderFactory<T extends Provider> extends ProviderFactory<T> { | ||
|
||
/** | ||
* Get operational info about given provider. This info contains informations about providers configuration and operational conditions (eg. errors in connection to remote systems etc). | ||
* Is used to be shown on "Server Info" page or in Operational monitoring endpoint. | ||
* | ||
* @return extendion of {@link ProviderOperationalInfo} | ||
*/ | ||
public ProviderOperationalInfo getOperationalInfo(); | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
model/api/src/main/java/org/keycloak/provider/ProviderOperationalInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.keycloak.provider; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Operational info about given Provider. | ||
* Contains info about Provider that can be shown on "Server Info" page or accessed over Operational monitoring endpoint. | ||
* | ||
* @author Vlastimil Elias (velias at redhat dot com) | ||
* @see MonitorableProviderFactory | ||
*/ | ||
public interface ProviderOperationalInfo extends Serializable { | ||
|
||
/** | ||
* Return true if provider is OK from operation point of view. It means it is able to perform necessary work. | ||
* It can return false for example if remote DB of JPA provider is not available, or LDAP server of LDAP based user federation provider is not available. | ||
* | ||
* @return true if provider is OK to perform his operation. | ||
*/ | ||
boolean isOk(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.