teiid.github.ioteiid.github.io/teiid-documents/12.2.x/teiid-documents.pdf · 1.1 1.2 1.3 1.3.1...
Transcript of teiid.github.ioteiid.github.io/teiid-documents/12.2.x/teiid-documents.pdf · 1.1 1.2 1.3 1.3.1...
-
1.1
1.2
1.3
1.3.1
1.3.1.1
1.3.2
1.3.2.1
1.3.2.1.1
1.3.2.1.2
1.3.2.1.3
1.3.2.1.4
1.3.2.1.5
1.3.2.1.6
1.3.2.1.7
1.3.2.1.8
1.3.2.1.9
1.3.2.1.10
1.3.2.1.11
1.3.2.1.12
1.3.2.1.13
1.3.2.1.14
1.3.2.1.15
1.3.2.1.15.1
1.3.2.1.15.2
1.3.2.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.6.1
1.3.6.2
1.3.6.3
1.3.6.4
1.3.6.5
1.3.6.6
1.3.7
1.3.8
TableofContentsIntroduction
LegalNotice
Administrator’sGuide
InstallationGuide
DockerizeTeiid
DeployingVDBs
DeployingVDBDependencies
AccumuloDataSources
AmazonSimpleDBDataSources
CassandraDataSources
CouchbaseDataSources
FileDataSources
Ftp/FtpsDataSources
GoogleSpreadsheetDataSources
InfinispanHotRodDataSources
JDBCDataSources
LDAPDataSources
MongoDBDataSources
PhoenixDataSources
SalesforceDataSources
SolrDataSources
WebServiceDataSources
KerberoswithRESTbasedServices
OAuthAuthenticationWithRESTBasedServices
VDBVersioning
Logging
ClusteringinTeiid
Monitoring
PerformanceTuning
MemoryManagement
Threading
CacheTuning
SocketTransports
LOBs
OtherConsiderations
TeiidConsole
SystemProperties
1
-
1.3.9
1.3.10
1.3.11
1.3.12
1.3.13
1.3.14
1.4
1.4.1
1.4.2
1.4.2.1
1.4.2.2
1.4.3
1.4.4
1.4.5
1.4.6
1.5
1.5.1
1.5.1.1
1.5.1.1.1
1.5.1.1.2
1.5.1.1.3
1.5.1.1.4
1.5.1.1.5
1.5.1.1.6
1.5.1.1.7
1.5.1.2
1.5.1.3
1.5.1.4
1.5.1.4.1
1.5.1.4.2
1.5.1.4.3
1.5.1.4.4
1.5.1.4.5
1.5.1.5
1.5.1.5.1
1.5.1.5.2
1.5.2
1.5.2.1
1.5.2.2
1.5.2.3
TeiidManagementCLI
DiagnosingIssues
MigrationGuideFromTeiid11.x
MigrationGuideFromTeiid10.x
MigrationGuideFromTeiid9.x
MigrationGuideFromTeiid8.x
CachingGuide
ResultsCaching
MaterializedViews
ExternalMaterialization
InternalMaterialization
CodeTableCaching
TranslatorResultsCaching
HintsandOptions
ProgrammaticControl
ClientDeveloper’sGuide
JDBCSupport
ConnectingtoaTeiidServer
DriverConnection
DataSourceConnection
StandaloneApplication
WildFlyDataSource
UsingMultipleHosts
SSLClientConnections
AdditionalSocketClientSettings
PreparedStatements
ResultSetLimitations
JDBCExtensions
StatementExtensions
PartialResultsMode
Non-blockingStatementExecution
ResultSetExtensions
ConnectionExtensions
UnsupportedJDBCMethods
UnsupportedClassesandMethodsin"java.sql"
UnsupportedClassesandMethodsin"javax.sql"
ODBCSupport
InstallingtheODBCDriverClient
ConfiguringtheDataSourceName(DSN)
DSNLessConnection
2
-
1.5.2.4
1.5.3
1.5.3.1
1.5.4
1.5.5
1.5.6
1.5.7
1.5.8
1.5.9
1.5.10
1.5.11
1.5.12
1.5.13
1.5.14
1.5.15
1.5.15.1
1.5.15.2
1.5.15.3
1.5.15.4
1.6
1.6.1
1.6.1.1
1.6.1.2
1.6.1.2.1
1.6.1.3
1.6.1.3.1
1.6.1.4
1.6.2
1.6.2.1
1.6.2.1.1
1.6.2.1.2
1.6.2.2
1.6.2.2.1
1.6.2.2.2
1.6.2.2.3
1.6.2.2.4
1.6.2.2.5
1.6.2.2.6
1.6.2.2.7
1.6.2.2.8
ODBCConnectionProperties
ODataSupport
ODataVersion4.0Support
UsingTeiidwithHibernate
UsingTeiidwithEclipseLink
GeoServerIntegration
QGISIntegration
SQLAlchemyIntegration
Node.jsIntegration
ADO.NETIntegration
Reauthentication
ExecutionProperties
SETStatement
SHOWStatement
Transactions
LocalTransactions
RequestLevelTransactions
UsingGlobalTransactions
Restrictions
Developer’sGuide
DevelopingJEEConnectors
ArchetypeTemplateConnectorProject
ImplementingtheTeiidFramework
ra.xmlfileTemplate
PackagingtheAdapter
AddingDependentLibraries
DeployingtheAdapter
TranslatorDevelopment
EnvironmentSetup
Settingupthebuildenvironment
ArchetypeTemplateTranslatorProject
ImplementingtheFramework
CachingAPI
CommandLanguage
ConnectionstoSource
DependentJoinPushdown
ExecutingCommands
ExtendingtheExecutionFactoryClass
LargeObjects
TranslatorCapabilities
3
-
1.6.2.2.9
1.6.2.3
1.6.2.4
1.6.2.5
1.6.2.5.1
1.6.2.6
1.6.3
1.6.3.1
1.6.3.2
1.6.3.2.1
1.6.4
1.6.5
1.6.6
1.6.7
1.6.8
1.6.8.1
1.7
1.7.1
1.7.2
1.8
1.8.1
1.8.2
1.8.2.1
1.8.2.2
1.8.2.3
1.8.2.4
1.8.2.5
1.8.2.6
1.8.2.7
1.8.2.8
1.8.2.9
1.8.2.10
1.8.3
1.8.3.1
1.8.3.2
1.8.3.3
1.8.3.4
1.8.3.4.1
1.8.3.4.2
1.8.3.4.3
TranslatorProperties
ExtendingTheJDBCTranslator
DelegatingTranslator
Packaging
AddingDependentModules
Deployment
UserDefinedFunctions
SourceSupportedFunctions
SupportforUser-DefinedFunctions(Non-Pushdown)
ArchethypeTemplateUDFProject
AdminAPI
CustomLogging
RuntimeUpdates
CustomMetadataRepository
PreParser
ArchethypeTemplatePreParserProject
EmbeddedGuide
LogginginTeiidEmbedded
SecureEmbeddedwithPicketBox
ReferenceGuide
DataSources
VirtualDatabases
DevelopingaVirtualDatabase
DDLVDB
UsingXML&DDL
VDBProperties
SchemaObjectDDL
DomainDDL
MultiSourceModels
MetadataRepositories
RESTServiceThroughVDB
VDBReuse
SQLSupport
Identifiers
Expressions
Criteria
ScalarFunctions
NumericFunctions
StringFunctions
Date_TimeFunctions
4
-
1.8.3.4.4
1.8.3.4.5
1.8.3.4.6
1.8.3.4.7
1.8.3.4.8
1.8.3.4.9
1.8.3.4.10
1.8.3.4.11
1.8.3.4.12
1.8.3.4.13
1.8.3.4.14
1.8.3.5
1.8.3.5.1
1.8.3.5.2
1.8.3.5.3
1.8.3.5.4
1.8.3.5.5
1.8.3.5.5.1
1.8.3.5.5.2
1.8.3.5.5.3
1.8.3.5.5.4
1.8.3.5.6
1.8.3.5.7
1.8.3.5.8
1.8.3.5.9
1.8.3.5.10
1.8.3.5.11
1.8.3.5.12
1.8.3.6
1.8.3.6.1
1.8.3.6.2
1.8.3.6.3
1.8.3.6.4
1.8.3.7
1.8.3.7.1
1.8.3.7.2
1.8.3.7.3
1.8.3.8
1.8.4
1.8.4.1
TypeConversionFunctions
ChoiceFunctions
DecodeFunctions
LookupFunction
SystemFunctions
XMLFunctions
JSONFunctions
SecurityFunctions
SpatialFunctions
MiscellaneousFunctions
NondeterministicFunctionHandling
DMLCommands
SetOperations
Subqueries
WITHClause
SELECTClause
FROMClause
XMLTABLE
ARRAYTABLE
OBJECTTABLE
TEXTTABLE
WHEREClause
GROUPBYClause
HAVINGClause
ORDERBYClause
LIMITClause
INTOClause
OPTIONClause
DDLCommands
TempTables
AlterView
AlterProcedure
AlterTrigger
Procedures
ProcedureLanguage
VirtualProcedures
UpdateProcedures
Comments
Datatypes
SupportedTypes
5
-
1.8.4.2
1.8.4.3
1.8.4.4
1.8.5
1.8.5.1
1.8.6
1.8.6.1
1.8.6.2
1.8.6.3
1.8.6.4
1.8.6.5
1.8.7
1.8.7.1
1.8.7.2
1.8.7.3
1.8.7.4
1.8.8
1.8.8.1
1.8.8.2
1.8.9
1.8.9.1
1.8.9.2
1.8.9.3
1.8.9.4
1.8.9.5
1.8.9.6
1.8.9.7
1.8.9.8
1.8.9.9
1.8.9.10
1.8.9.11
1.8.9.11.1
1.8.9.11.2
1.8.9.11.3
1.8.9.11.4
1.8.9.11.5
1.8.9.11.6
1.8.9.11.7
1.8.9.11.8
1.8.9.11.9
TypeConversions
SpecialConversionCases
EscapedLiteralSyntax
UpdatableViews
preservedTable
TransactionSupport
AutoCommitTxnExecutionProperty
UpdatingModelCount
JDBCandTransactions
TransactionalBehaviorwithJBossDataSourceTypes
LimitationsandWorkarounds
DataRoles
Permissions
RoleMapping
XMLDefinition
Customizing
SystemSchema
SYS
SYSADMIN
Translators
AmazonS3Translator
AmazonSimpleDBTranslator
ApacheAccumuloTranslator
ApacheSOLRTranslator
CassandraTranslator
CouchbaseTranslator
DelegatingTranslators
FileTranslator
GoogleSpreadsheetTranslator
InfinispanTranslator
JDBCTranslators
ActianVectorTranslator
ApachePhoenixTranslator
ClouderaImpalaTranslator
DB2Translator
DerbyTranslator
ExasolTranslator
GreenplumTranslator
H2Translator
HiveTranslator
6
-
1.8.9.11.10
1.8.9.11.11
1.8.9.11.12
1.8.9.11.13
1.8.9.11.14
1.8.9.11.15
1.8.9.11.16
1.8.9.11.17
1.8.9.11.18
1.8.9.11.19
1.8.9.11.20
1.8.9.11.21
1.8.9.11.22
1.8.9.11.23
1.8.9.11.24
1.8.9.11.25
1.8.9.11.26
1.8.9.11.27
1.8.9.11.28
1.8.9.11.29
1.8.9.11.30
1.8.9.11.31
1.8.9.11.32
1.8.9.12
1.8.9.13
1.8.9.14
1.8.9.15
1.8.9.16
1.8.9.17
1.8.9.18
1.8.9.19
1.8.9.20
1.8.9.21
1.8.9.22
1.8.9.23
1.8.10
1.8.10.1
1.8.10.2
1.8.10.3
1.8.10.4
HSQLTranslator
InformixTranslator
IngresTranslators
IntersystemsCacheTranslator
JDBCANSITranslator
JDBCSimpleTranslator
MetaMatrixTranslator
MicrosoftAccessTranslators
MicrosoftSQLServerTranslator
ModeShapeTranslator
MySQLTranslators
NetezzaTranslator
OracleTranslator
OSISoftPITranslator
PostgreSQLTranslator
PrestoDBTranslator
RedshiftTranslator
SAPHanaTranslator
SAPIQTranslator
SybaseTranslator
TeiidTranslator
TeradataTranslator
VerticaTranslator
JPATranslator
LDAPTranslator
LoopbackTranslator
MicrosoftExcelTranslator
MongoDBTranslator
ODataTranslator
ODataV4Translator
SwaggerTranslator
OLAPTranslator
SalesforceTranslators
SAPGatewayTranslator
WebServicesTranslator
FederatedPlanning
PlanningOverview
QueryPlanner
QueryPlans
FederatedOptimizations
7
-
1.8.10.5
1.8.10.6
1.8.10.7
1.8.10.8
1.8.11
1.8.11.1
1.8.11.2
1.8.11.3
1.8.11.4
1.8.12
1.9
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
1.9.6
1.9.7
1.9.8
1.9.9
SubqueryOptimization
XQueryOptimization
FederatedFailureModes
ConformedTables
Architecture
Terminology
DataManagement
QueryTermination
Processing
BNFforSQLGrammar
SecurityGuide
LoginModules
TeiidServerTransportSecurity
JDBC/ODBCSSLconnectionusingself-signedSSLcertificates
DataSourceSecurity
KerberossupportthroughGSSAPI
CustomAuthorizationValidator
SAMLBasedSecurityForOData
OAuth2BasedSecurityForODataUsingKeyCloak
SAMLBasedSecurityForODataUsingKeyCloak
8
-
LegalNotice
12.2TeiidDocumentation
Contribute
ThedocumentationprojectishostedonGitHubat(teiid/teiid-documents).
ItispublishedonGitHubPagesat(teiid.github.io/teiid-documents/master/content)('master'canbesubstitutedwithanymaintainedbranche.g.'10.3.x').
ForsimplechangesyoucanjustusetheonlineeditingcapabilitiesofGitHubbynavigatingtotheappropriatesourcefileandselectingfork/edit.
Forlargerchangesfollowthese3steps:
Step.1clonethesources
[email protected]:teiid/teiid-documents.git
Step.2doedit
Useanytexteditortoedittheadocfiles,AsciiDocSyntaxQuickReferencecanhelpyouinAsciiDocSyntax.
Step.3submityourchange
Oncethepullrequestiscommittedthepublishedcontentwillbeupdatedautomatically.
Testlocally
Youmayneedtestlocally,tomakesurethechangesarecorrect,todothisinstallgitbook,thenexecutethefollowingcommandsfromthecheckoutlocation:
$gitbookinstall$gitbookserve-w
Introduction
9
https://github.com/teiid/teiid-documentshttp://teiid.github.io/teiid-documents/master/contenthttp://asciidoctor.org/docs/asciidoc-syntax-quick-reference/https://github.com/GitbookIO/gitbook
-
Onceabovecommandsexecutesuccessfully(maytakeafewminutes),youshouldseethe"Servingbookat…"messageandthehttpformatdocumentcanbetestedlocallyviahttp://localhost:4000/.
Generatehtml/pdf/epub/mobi
Youmaylocallycreaterenderedformsofthedocumentation.Todothisinstallgitbookandebook-convert,thenexecutethefollowingcommandsfromthecheckoutlocation:
$gitbookbuild./teiid-documents$gitbookpdf./teiid-documents.pdf$gitbookepub./teiid-documents.epub$gitbookmobi./teiid-documents.mobi
Onceabovecommandsexecutessuccessfully,theteiid-documentsfolder,teiid-documents.pdf,teiid-documents.epub,andteiid-documents.mobiwillbegenerated.
CIBuild
The.travis.yamlfileallowsforcontinuousintegrationofdocchangesonmultiplebranchestobepublishedtoasinglegh-pagesbranch.Whenyousetupthetravisbuildjobyoumustcreatethegh-pagesbranchifitdoesnotalreadyexist:
gitcheckout--orphangh-pagesgitrm-rf.gitcommit--allow-empty-m"initializinggh-pages"gitpushorigingh-pages
YouwillneedtoaddanappropriateuserandgitapikeywithrepoaccessastheenvironmentpropertiesGITHUB_USERandGITHUB_API_KEYrespectivelyinthetravisbuildsettings.
Introduction
10
https://github.com/GitbookIO/gitbookhttps://download.calibre-ebook.com
-
LegalNotice
1801VarsityDriveRaleigh,NC27606-2072USAPhone:+19197543700Phone:8887334281Fax:+19197543701POBox13588ResearchTrianglePark,NC27709USA
Copyright©2005-2019byRedHat,Inc.Thiscopyrightedmaterialismadeavailabletoanyonewishingtouse,modify,copy,orredistributeitsubjecttothetermsandconditionsoftheApacheSoftwareLicense,Version2.0.
RedHatandtheRedHat"ShadowMan"logoareregisteredtrademarksofRedHat,Inc.intheUnitedStatesandothercountries.
Allothertrademarksreferencedhereinarethepropertyoftheirrespectiveowners.
CA2086862BD69DFC65F6ECC4219180CDDB42A60E
LegalNotice
11
mailto:[email protected]
-
Administrator’sGuideThisguideisintendedforanyuserwhoassumesroleofadeveloper/administratorofTeiidinstance.ThisguideguidesuserthroughinstallationofTeiidServer,configurationofdifferentservicesanddeploymentofTeiidartifactssuchasVDBs.BeforeonecandelveintoTeiiditisveryimportanttolearnfewbasicconstructsofTeiid,likewhatisVDB?whatisModel?etc.Forthatpleasereadtheshortintroduction.
Administrator’sGuide
12
http://teiid.io/about/basics/
-
InstallationGuideTeiidneedstobeinstalledintoanexistingWildFly15.0.1installation.
Note Teiidprovidesanembeddedkit,howeveritshouldbeconsideredatechpreviewasitsAPIswilllikelyevolveandthereissparsedocumentation.
StepstoinstallTeiid
DownloadtheWildFlyapplicationserver.Installtheserverbyunzippingintoaknownlocation.Ex:/apps/jboss-install
Note YoumayalsochoosetouseanexistingASinstallation.HoweverifapreviousversionofTeiidwasalreadyinstalled,youmustremovetheoldTeiiddistributionartifactsbeforeinstallingthenewversion.
DownloadTeiid.UnzipthedownloadedartifactinsidetheWildFlyinstallation.Teiid12.2directorystructurematchesWildFlydirectly-itisjustanoverlay.ThiswilladdnecessarymodulesandconfigurationfilestoinstallTeiidinWildFly15.0.1inbothStandaloneandDomainmodes.Teiidprovidesseparateconfigurationfilesforbothstandalonemodeanddomainmode.BasedonmodetypeyouselectedtorunWildFly15.0.1,youmayhavetorunaCLIscripttocompletetheTeiidinstallation.
The"Domain"moderecommendedinaclusteredenvironmenttotakeadvantageofclusteredcachingandclustersafedistributionofevents.Teiid’sdefaultconfigurationforDomainmodethroughCLIscriptconfiguredforhighavailabilityandclusteredcaching.
StandaloneMode
ifyouwanttostartthe"standalone"profile,executethefollowingcommand
/bin/standalone.sh-c=standalone-teiid.xml
InstallingTeiidusingCLIscript
TheaboveisstartingWildFlyinaseparateTeiidspecificconfigurationthatisbasedstandalone.xml.However,ifyoualreadyworkingwithapredefinedconfigurationforexampledefaultstandalone.xmlandwouldliketoinstallTeiidintothatconfiguration,thenyoucanexecutethefollowingJBossCLIscript.First,starttheserver
/bin/standalone.sh
theninaseparateconsolewindowexecute
/bin/jboss-cli.sh--file=bin/scripts/teiid-standalone-mode-install.cli
thiswillinstallTeiidsubsystemintotherunningconfigurationoftheWildFly15.0.1instandalonemode.
Note:Ifyouareusingstandalonehaorstandalonefull-ha,youshouldusetheteiid-standalone-ha-mode-install.cliscriptinstead.
DomainMode
InstallationGuide
13
http://wildfly.org/downloads/http://teiid.io/teiid_runtimes/teiid_wildfly/downloads/
-
Tostarttheserverin"Domain"mode,installWildFly15.0.1andTeiid12.2onalltheserversthataregoingtobepartofthecluster.Selectoneoftheserversasthe"master"domaincontroller,therestoftheserverswillbeslavesthatconnecttothe"master"domaincontrollerforalltheadministrativeoperations.PleaserefertoWildFly15.0.1provideddocumentationforfulldetails.
Onceyouconfiguredalltheservers,startthe"master"nodewithfollowingcommand
/bin/domain.sh
andon"slave"nodes
/bin/domain.sh
Theslavenodesfetchtheirdomainconfigurationfromthe"master"node.
Oncealltheserversareup,completetheinstallationtorunindomainmodebyexecutingthefollowingcommandagainstthe"master"node.Notethatthisonlyneedstoberunonceperdomain(i.e.cluster)install.ThisscriptwillinstallTeiidinthehaandfull-haprofiles.Itwillalsore-configuremain-server-grouptostartthehaprofile.Onceindomainmode,youcannotstaticallydeployresourcesbydroppingtheminthedomain/deploymentsfolder,sothisscriptwilldeploythedefaultresources(file,ldap,salesforceandwsconnectors)usingtheCLIinterface.
/bin/jboss-cli.sh--file=bin/scripts/teiid-domain-mode-install.cli
Thatsit!.WildFlyandTeiidarenowinstalledandrunning.Seebelowinstructionstocustomizevariousothersettings.
OnceVDBshavebeendeployed,userscannowconnecttheirJDBCapplicationstoTeiid.IfyouneedhelponconnectingyourapplicationtoTeiidusingJDBCcheckouttheClientDeveloper’sGuide.
DirectoryStructureExplained
ThisshowsthecontentsoftheTeiid12.2deployment.ThedirectorystructureisexactlythesameunderanyJBossprofile.
DirectoryStructure
/bin/scripts/docs/teiid/datsources/schema/examples/domain/configuration/modules/system/layers/base/org/jboss/teiid/*/standalone/configurationstandalone-teiid.xml
InstallationGuide
14
https://docs.jboss.org/author/display/WFLY9/WildFly+9+Cluster+Howto
-
Name Description
bin/scripts ContainsinstallationandutilityCLIscriptsforsettingupTeiidindifferentconfigurations.
docs/teiid Containsdocuments,examples,sampledatasourceXMLfragmentsandschemafiles.
/standalone/configurationstandalone-teiid.xml-MasterconfigurationfilefortheTeiidsystem.ThisfilecontainstheTeiidsubsystem,inadditiontothestandardWildFlywebprofilesubsystems
/domain/configuration/ -
/modules/system/layers/base/org/jboss/teiid/* ThisdirectorycontainstheTeiidmodulesforWildFly15.0.1system
/modules/system/layers/base/org/jboss/teiid/client
ThisdirectorycontainsTeiidclientlibraries.IthastheTeiidJDBCdriverjar,"teiid-12.2.0-jdbc.jar",andalsocontains"teiid-hibernate-dialect-12.2.0.jar"thatcontainsTeiid’sHibernatedialect.
{standaloneordomain}/tmp/teiid
Thisdirectoryunderstandaloneordomain,containstemporaryfilescreatedbyTeiid.Thesearemostlycreatedbythebuffermanager.ThesefilesarenotneededacrossaVMrestart.CreationofTeiidlobvalues(forexamplethroughSQL/XML)willtypicallycreateonefileperlobonceitexceedstheallowableinmemorysizeof8KB.Inheavyusagescenarios,considerpointingthebufferdirectoryatapartitionthatisroutinelydefragmented.
{standaloneordomain}/data/teiid-data Thisdirectoryunderstandaloneordomain,containscachedvdbmetadatafiles.Donoteditthemmanually.
InstallationGuide
15
-
DockerizeTeiidRunningTeiidasaDockercontainerisstraight-forward,butsincetheruntimebyitselfisnotaturn-keyenvironmentyoumustconsiderhowyouwillconfigure/usetheserverfromthere.
ThefollowingisabasicDockerfilethatcanbeusedtocreateabaseimage.JustcreateaDockerfilewiththesecontentsandrun"dockerbuild."fromthatdirectory.
FROMjboss/wildfly:15.0.1.Final
ENVJBOSS_HOME/opt/jboss/wildfly
#SettheTEIID_VERSIONenvvariableENVTEIID_VERSION12.2.0
#DownloadandunzipTeiidserverRUNcd$JBOSS_HOME\&&curl-Ohttps://oss.sonatype.org/service/local/repositories/releases/content/org/teiid/teiid/$TEIID_VERSION/teiid-wildfly-$TEIID_VERSION-dist.zip\&&bsdtar-xfteiid-wildfly-$TEIID_VERSION-dist.zip\&&chmod+x$JBOSS_HOME/bin/*.sh\&&rmteiid-wildfly-$TEIID_VERSION-dist.zip
VOLUME["$JBOSS_HOME/standalone","$JBOSS_HOME/domain"]
USERjboss
ENVLAUNCH_JBOSS_IN_BACKGROUNDtrue
#ExposeTeiidserverportsEXPOSE808099903100035432
#RunTeiidserverandbindtoallinterfaceCMD["/bin/sh","-c","$JBOSS_HOME/bin/standalone.sh-cstandalone-teiid.xml-b0.0.0.0-bmanagement0.0.0.0"]
Pre-builtimagescanbefoundatDockerHub.
IfyouarejustusingtheTeiidDockerenvironmentformorethanjusttestingyouwilllikelywanttoextendthebaseimageorbaseDockerfiletooverlaythenecessarymodules,vdbs,andotherartifactsaswellasrunanynecessaryclitocreateyourdatasources.
MutableContainer
SeetheTeiidDockerQuickstartthatshowsstartingtheTeiidcontainerandperformingmutativeoperationsafteritisstarted.
ImmutableContainer
DockerizeTeiid
16
https://hub.docker.com/r/jboss/teiid/https://developer.jboss.org/wiki/QuickstartExampleWithDockerizedTeiid
-
SeetheWildFlywithMySQLexamplethatshowsextendingtheWildFlyimagetoincludeaMySQLsource.Notethatthisisbaseduponalsohavingthedatabasecontainerizedandthusexposingthecontainerlinkingvariables.Ifthatisnotthecaseforyourenvironment,youwillhavetoprovidethehost/portinformationinadifferentway.
OpenShift
OpenShiftistheRedHatenterpriseofferingofKuberneteswhichalsoutilizesDocker.WhileyoumayusuallybeabletouseyourexistingDockercontainersonOpenShift,thereareadditionalconsiderationsandfeatures.
SeeJDVonOpenShiftforanoverviewofhowtheproductizedversionofTeiidcanberunonOpenShift.
Asimplifiedformofimmutablecontainers,butwithadditionalOpenShiftfeaturessuchashealthchecksandbetterJVMconstraints,canbeseenatOpenShiftTeiidServerDocker.Notehoweverthatmanyoftheresourceconcernshavebeenaddressedbylaterjavaversionswhichautomaticallydetectmemoryconstraintsinvmsizingandreportanappropriatenumberofavailableprocessors.
Seelink:http://teiid.io/tools/beetle_studio/fortoolingthatprovidesaturn-keyexperienceforcreatingcontainerizedvirtualizations.Underthecoversitusesfabric8andThorntailtocreateimages.SeeTeiidThorntailExamplesfordirectusageofthebuildlogic.
DockerizeTeiid
17
http://blog.arungupta.me/docker-container-linking-across-multiple-hosts-techtip69/https://dzone.com/articles/red-hat-jboss-data-virtualization-on-openshift-part-1-getting-startedhttps://github.com/shawkins/teiid-openshift-templates/tree/master/server-dockerhttps://github.com/teiid/thorntail-teiid-examples
-
DeployingVDBsAVDBistheprimarymeanstodefineaVirtualDatabaseinTeiid.SeetheReferenceGuidetocreateaVDB.
Onceyouhavea"VDB"builtitcanbedeployed/undeployedinTeiidruntimeindifferentways.
WarningIfVDBversioningisnotusedtogivedistinctversionnumbers,overwritingaVDBofthesamenamewillterminateallconnectionstotheoldVDB.ItisrecommendedthatVDBversioningbeusedforproductionsystems.
Caution RemovinganexistingVDBwillimmediatelycleanupVDBfileresources,andwillautomaticallyterminateexistingsessions.
CautionTheruntimenamesofdeployedVDBartifactsmusteitherbe*.vdbforazipfileor*-vdb.xmlforanxmlfileor-vdb.ddlforDDLfile.FailuretonamethedeploymentproperlywillresultinadeploymentfailureastheTeiidsubsystemwillnotknowhowtoproperlyhandletheartifact.
Tip ifyouhaveexistingVDBincombinationof*.vdbor-vdb.xmlformat,youcanmigratetoallDDLversionusingthe"teiid-convert-vdb.bat"or"teiid-convert-vdb.sh"utilityinthe"bin"directoryoftheinstallation.
DirectFileDeployment
CopytheVDBfileintothe
/standalone/deployments
directory.ThencreateanemptymarkerfilewithsamenameastheVDBwithextension".dodeploy"inthesamedirectory.Forexample,ifyourvdbnameis"enterprise.vdb",thenmarkerfilenamemustbe"enterprise.vdb.dodeploy".MakesurethattherearenootherVDBfileswiththesamename.IfaVDBalreadyexistswiththesamename,thenthisVDBwillbereplacedwiththenewVDB.ThisisthesimplestwaytodeployaVDB.Thisismostlydesignedforquickdeploymentduringdevelopment,whentheTeiidserverisavailablelocallyonthedeveloper’smachine.
Note ThisonlyworksintheStandalonemode.ForDomainmode,youmustuseoneoftheotheravailablemethods.
AdminConsoleDeployment(Web)
Usetheadminwebconsoleat:
http://:/console
MoredetailsforthiscanbefoundintheAdminConsoleVDBdeploymentsection.ThisistheeasiestwaytodeployaVDBtoaremoteserver.
CLIbasedDeploymentWildFly15.0.1providescommandlineinterface(CLI)fordoinganykindofadministrativetask.Execute
bin/jboss-cli.sh--connect
DeployingVDBs
18
http://www.jboss.org/teiid/basics/virtualdatabases.html
-
commandandrun
#instandalonemodedeploy/path/to/my.vdb
#indomainmodedeploy/path/to/my.vdb--server-groups=main-server-group
todeploytheVDB.Notethatindomainmode,youneedtoeitherselectaparticular"server-group"orallavailableservergroupsaredeploymentoptions.CheckoutCLIdocumentationformoregeneralusageoftheCLI.
AdminAPIDeployment
Seethe"deploy"method.ConsulttheAdminAPIdocumentationformoreinformation.WhenusingAdminAPI,indomainmode,theVDBisdeployedtoalltheavailableservers.
AdminAPIDeployment
TheAdminAPI(lookinorg.teiid.adminpi.*)providesJavaAPImethodsthatletsauserconnecttoaTeiidruntimeanddeployaVDB.IfyouneedtoprogramaticallydeployaVDBusethismethod.ThismethodispreferableforOEMusers,whoaretryingtoextendtheTeiid’scapabilitiesthroughtheirapplications.WhenusingAdminAPI,indomainmode,theVDBisdeployedtoalltheservers.
DeployingVDBs
19
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide
-
DeployingVDBDependenciesApartfromdeployingtheVDB,theuserisalsoresponsibleforprovidingallthenecessarydependentlibraries,configurationforcreatingthedatasourcesthatareneededbythemodels(schemas)definedin"META-INF/vdb.xml"fileinsideyourVDB.Forexample,ifyouaretryingtointegratedatafromOracleRDBMSandFilesourcesinyourVDB,thenyouareresponsibleforprovidingtheJDBCdriverfortheOraclesourceandanynecessarydocumentsandconfigurationthatareneededbytheFileTranslator.
DatasourceinstancesmaybeusedbysingleVDB,ormaybesharedwithasotherVDBsorotherapplications.Considersharingconnectionstodatasourcesthathaveheavy-weightandresourceconstrained.
WiththeexceptionofJDBCsources,othersupporteddatasourceshaveacorrespondingJCAconnectorintheTeiidkit.Eitherdirectlyeditthestandalone-teiid.xmloruseCLItocreatetherequireddatasourcesbytheVDB.Exampleconfigurationsareprovidedforallthesourcesin"/docs/teiid/datasources"directory.NotethatintheDomainmode,youmustuseCLIoradmin-consoleorAdminAPItoconfigurethedatasources.
Somedatasourcesmaycontainpasswordsorothersensitiveinformation.SeetheWIKIarticleEncryptingDataSourcePasswordstonotstorepasswordsinplaintext.
OncetheVDBanditsdependenciesaredeployed,thenclientapplicationscanconnectusingtheJDBCAPI.Ifthereareanyerrorsinthedeployment,aconnectionattemptwillnotbesuccessfulandamessagewillbelogged.Youcanusetheadmin-consoletoolorcheckthelogfilesforerrorsandcorrectthembeforeproceeding.CheckClientDeveloper’sGuideonhowtouseJDBCtoconnecttoyourVDB.
DeployingVDBDependencies
20
https://community.jboss.org/wiki/JBossAS7SecuringPasswords
-
ApacheAccumuloDataSourcesAccumulodatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaAccumulodatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid:add(jndi-name=java:/accumulo-ds,class-name=org.teiid.resource.adapter.accumulo.AccumuloManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=ZooKeeperServerList:add(value=localhost:2181)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Username:add(value=user)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Password:add(value=password)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=InstanceName:add(value=instancename)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Roles:add(value=public)/subsystem=resource-adapters/resource-adapter=accumulo:activaterunbatch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
ZooKeeperServerList
Acommaseparatedlistofzookeeperserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
true none
Username ConnectionUser’sName true none
Password ConnectionUser’spassword true none
InstanceName Accumuloinstancename true none
Rolesoptionalvisibilityforuser,supplymultiplewithcommaseparated
false none
TofindoutallthepropertiesthataresupportedbythisAccumuloConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=accumulo)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/accumulo"directoryunder"resource-adapters"subsystem.Shutdowntheserver
DeployingVDBDependencies
21
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
beforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
22
-
AmazonSimpleDBDataSourcesSimpleDBdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaSimpleDBdatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectaccesskeys.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS:add(jndi-name=java:/simpledbDS,class-name=org.teiid.resource.adapter.simpledb.SimpleDBManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS/config-properties=AccessKey:add(value=xxx)/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS/config-properties=SecretAccessKey:add(value=xxx)/subsystem=resource-adapters/resource-adapter=simpledb:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisSimpleDBConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=simpledb)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/simpledb"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
23
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
CassandraDataSourcesCassandradatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaCassandradatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS:add(jndi-name=java:/cassandraDS,class-name=org.teiid.resource.adapter.cassandra.CassandraManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS/config-properties=Address:add(value=127.0.0.1)/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS/config-properties=Keyspace:add(value=my-keyspace)/subsystem=resource-adapters/resource-adapter=cassandra:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisCassandraConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=cassandra)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/cassandra"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
24
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
CouchbaseDataSourcesCouchbasedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaCouchbasedatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=couchbaseQS:add(module=org.jboss.teiid.resource-adapter.couchbase)/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS:add(jndi-name="java:/couchbaseDS",class-name=org.teiid.resource.adapter.couchbase.CouchbaseManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=ConnectionString:add(value="localhost")/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Keyspace:add(value="default")/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Namespace:add(value="default")runbatch
TofindoutallthepropertiesthataresupportedbythisCouchbaseConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=couchbase)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/couchbase"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
25
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
FileDataSourcesFiledatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.Therearemanywaystocreatethefiledatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectdirectorynameandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS:add(jndi-name=java:/fileDS,class-name=org.teiid.resource.adapter.file.FileManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS/config-properties=Parentdirectory:add(value=/home/rareddy/testing/)/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS/config-properties=AllowParentPaths:add(value=true)/subsystem=resource-adapters/resource-adapter=file:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisFileConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=file)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/file"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
26
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
Ftp/FtpsDataSourcesFtp/FtpsdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreatetheFtp/Ftpsdatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectdirectorynameandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
/subsystem=resource-adapters/resource-adapter=ftp:add(module=org.jboss.teiid.resource-adapter.ftp)/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS:add(jndi-name=${jndi.name}",class-name=org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=ParentDirectory:add(value="${ftp.parent.dir}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Host:add(value="${ftp.parent.host}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Port:add(value=${ftp.parent.port}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Username:add(value=${ftp.parent.username}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Password:add(value=${ftp.parent.password}")/subsystem=resource-adapters/resource-adapter=ftp:activate()
TofindoutallthepropertiesthataresupportedbythisFtp/FtpsConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=ftp)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/ftp"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
27
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
GoogleSpreadsheetDataSources
TheGoogleJCAconnectorisnamedteiid-connector-google.rar.Theexamplesincludeasamplegoogle.xmlfile.TheJCAconnectorhasnumberofconfig-propertiestodriveauthentication.TheJCAconnectorconnectstoexactlyonespreadsheetwitheachsheetexposedasatable.
AuthenticationtoyourgoogleaccountmaybedoneusingOAuth,whichrequiresarefreshtoken(outlinedbelow).
Configproperty Description
ClientId clientIDforaccess.Ifnotspecified,theTeiiddefaultwillbeused.
ClientSecret clientsecretforaccess.Ifnotspecified,theTeiiddefaultwillbeused.
RefreshToken UseguidebelowtoretrieveRefreshToken.RequestaccesstoGoogleDriveandSpreadsheetAPI.
SpreadsheetName Name/TitleoftheSpreadsheet.
SpreadsheetId IDofSpreadsheet.
ApiVersion OptionalGDataAPIversion.Canbev3orv4.Defaultstov3.
BatchSize Maximumnumberofrowsthatcanbefetchedatatime.Defaultsto4096.
Thev4apirequirestheuseofSpreadsheetIdandspecifyingClientIdandClientSecret.Somesheetssuchasthosecontainedinateamdrivewillonlybevisibletothev4api.
CreateAuthorizationCredentials
Forv3connectionsitisrecommendedthatyoucreateyourownauthorizationcredentialsratherthanrelyingonthedefaultTeiidclientidandclientsecret.Forv4connectionsitisrequiredthatyoucreateyourowncredentials.CreatingyourownprojectwillgiveyougreatercontrolovermonitoringandcontrollingAPIaccess.
YoushouldfollowtheOAuth2ForDevicesGuideprerequisites.YoushouldallowtheprojectaccesstoGoogleDriveAPIandtheSheetsAPI.
Acondensedformoftherestoftheguide"ObtainingOAuth2.0accesstokens"iscoverednextas"GettinganOAuthRefreshToken".
GettinganOAuthRefreshToken
WithabrowserorotherclientissuetherequestwiththeappropriateclientID:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=;
DeployingVDBDependencies
28
https://developers.google.com/accounts/docs/OAuth2ForDeviceshttps://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id="
-
ThencopytheauthorizationcodeintofollowingPOSTrequestandrunitincommandline:
curl\--data-urlencodecode=\--data-urlencodeclient_id=\--data-urlencodeclient_secret=\--data-urlencoderedirect_uri=urn:ietf:wg:oauth:2.0:oob\--data-urlencodegrant_type=authorization_codehttps://accounts.google.com/o/oauth2/token
Therefreshtokenwillbeintheresponse.
TousetheTeiiddefaults:
Clickonhttps://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=217138521084.apps.googleusercontent.com
ThencopytheauthorizationcodeintofollowingPOSTrequestandrunitincommandline:
curl\--data-urlencodecode=\--data-urlencodeclient_id=217138521084.apps.googleusercontent.com\--data-urlencodeclient_secret=gXQ6-lOkEjE1lVcz7giB4Poy\--data-urlencoderedirect_uri=urn:ietf:wg:oauth:2.0:oob\--data-urlencodegrant_type=authorization_codehttps://accounts.google.com/o/oauth2/token
ImplementationDetailsGoogleTranslatorisimplementedusingGDataAPIandtheGoogleVisualizationProtocol.v4connectionsstillrelyuponv3functionalityforupdate/deleteasthev4APIdoesnotprovideappropriatesearchfunctionality.
DeployingVDBDependencies
29
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=217138521084.apps.googleusercontent.com
-
InfinispanDataSourcesInfinispandatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaInfinispanhotrodbaseddatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandsusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=infinispanDS:add(module=org.jboss.teiid.resource-adapter.infinispan.hotrod)/subsystem=resource-adapters/resource-adapter=infinispanDS/connection-definitions=ispnDS:add(jndi-name="java:/ispnDS",class-name=org.teiid.resource.adapter.infinispan.hotrod.InfinispanManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=infinispanDS/connection-definitions=ispnDS/config-properties=RemoteServerList:add(value="{host}:11222")/subsystem=resource-adapters/resource-adapter=infinispanDS:activaterun-batch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
RemoteServerList
Acommaseparatedlistofserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
Yes n/a
UserNameIfremoteserverissecured,thispropertyusedasusernametologin
No n/a
PasswordIfremoteserverissecured,thispropertyusedaspasswordtologin
No n/a
SaslMechanism
Ifremoteserverissecured,thispropertydefinesthetypeofsecurity.Allowedvaluesare"CRAM-MD5","DIGEST-MD5","PLAIN","EXTERNAL"."EXTERNAL"iswhencertificatebasedsecurityatuse,allothersuseusername/password.
No n/a
AuthenticationRealm Realmtouseforauthentication. No n/a
AuthenticationServerName InfinispanservernamewheretheAuthenticationishandled. No n/a
TrustStoreFileName
When"EXTERNAL"SaslMechnismused,usethispropertytodefinetruststore.
No n/a
DeployingVDBDependencies
30
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
AlternativelyJAVAsystemproperty"javax.net.ssl.trustStore"canalsobedefinedinstead.
TrustStorePassword
When"EXTERNAL"SaslMechnismused,usethispropertytodefinetruststorepassword.AlternativelyJAVAsystemproperty"javax.net.ssl.trustStorePassword"canalsobedefinedinstead.
No n/a
KeyStoreFileName
When"EXTERNAL"SaslMechnismused,usethispropertytodefinekeystore.AlternativelyJAVAsystemproperty"javax.net.ssl.keyStore"canalsobedefinedinstead.
No n/a
KeyStorePassword
When"EXTERNAL"SaslMechnismused,usethispropertytodefinekeystorepassword.AlternativelyJAVAsystemproperty"javax.net.ssl.keyStorePassword"canalsobedefinedinstead.
No n/a
TofindoutallthepropertiesthataresupportedbythisInfinispanConnector,executethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=infinispan)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/infinispan"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
31
-
JDBCDataSourcesThefollowingisanexamplehighlightingconfiguringanOracledatasource.Theprocessisnearlyidenticalregardlessofthedatabasevendor.TypicallytheJDBCjarandtheconfigurationlikeconnectionURLandusercredentialschange.
Thereareconfigurationtemplatesforallthedatasourcesinthe"/docs/teiid/datasources"directory.AcompletedescriptionhowadatasourcecanbeaddedintoWildFlyisalsodescribedhere.Thebelowwepresenttwodifferentwaystocreateadatasource.
DeployingasingleJDBCJarFile
FirststepinconfiguringthedatasourceisdeployingtherequiredJDBCjarfile.Forexample,ifyouaretryingtocreateaOracledatasource,firstyouneedtodeploythe"ojdbc6.jar"filefirst.ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.
deploy/path/to/ojdbc6.jar
Tip Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallycopythis’ojdbc6.jar"tothe"/standalone/deployments"directory,toautomaticallydeploywithoutusingtheCLItool.
CreatingamodulefortheDriver
Youmayalsocreateamoduletohavemorecontroloverthehandlingofthedriver.Incaseswherethedriverisnotcontainedinasinglefile,thismaybepreferabletocreatinga"uber"jarasthedependenciescanbemanagedseparately.
Creatingamoduleforadriverisnodifferentthananyothercontainermodule.Youjustincludethenecessaryjarsasresourcesinthemoduleandreferenceothermodulesasdependencies.
...
CreateDataSourceNowthatyouhavetheJDBCdriverdeployedorthemodulecreated,itistimetocreateadatasourceusingthisdriver.TherearemanywaystocreatethedatasourceusingCLI,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentialsandedittheJNDInametomatchtheJNDInameyouusedinVDB.
/subsystem=datasources/data-source=oracel-ds:add(jndi-name=java:/OracleDS,driver-name=ojdbc6.jar,connection-url=jdbc:oracle:thin:{host}:1521:orcl,user-name={user},password={password})/subsystem=datasources/data-source=oracel-ds:enable
DeployingVDBDependencies
32
https://docs.jboss.org/author/display/WFLY10/DataSource+configurationhttps://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLIhttps://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
Thedriver-namewillmatchthenameofjarormodulethatyoudeployedforthedriver.
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/oracle"directoryunder"datasources"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
33
-
LDAPDataSourcesLDAPdatasourcesuseaTeiidspecificJCAconnectorwhichisdeployedintoWildFly15.0.1duringinstallation.Therearemanywaystocreatetheldapdatasource,usingCLI,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS:add(jndi-name=java:/ldapDS,class-name=org.teiid.resource.adapter.ldap.LDAPManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapUrl:add(value=ldap://ldapServer:389)/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserDN:add(value={cn=???,ou=???,dc=???})/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserPassword:add(value={pass})/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapTxnTimeoutInMillis:add(value=-1)/subsystem=resource-adapters/resource-adapter=ldap:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisLDAPConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=ldap)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/ldap"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
Note Touseananonymousbind,settheLdapAuthTypetonone.Whenperformingananonymousbindthevaluesfortheadminuserandpasswordwillbeignored.
Tip Ifyouexperiencestaleconnectionsinthepool,youshouldenableeitherthevalidate-on-matchorthebackground-validationpoolsettings.
DeployingVDBDependencies
34
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
MongoDBDataSourcesMongoDBdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaMongoDBdatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS:add(jndi-name="java:/mongoDS",class-name=org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS/config-properties=RemoteServerList:add(value="{host}:27017")/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS/config-properties=Database:add(value="{db-name}")/subsystem=resource-adapters/resource-adapter=mongodb:activaterunbatch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
RemoteServerListAcommaseparatedlistofserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
true
Username ConnectionUser’sName false none
Password ConnectionUser’spassword false none
Database MongoDBdatabasename true none
SecurityType
MongoDBTypeofAuthenticationtobeused.Allowedvaluesare"None","SCRAM_SHA_1","MONGODB_CR","Kerberos","X509".IfyouareusingMongoDBversionlessthan3.0,MongoDBbydefaultuses"MONGODB_CR",thusthisvalueneedtobesetaccordinglyorsettoNone.
false SCRAM_SHA_1
AuthDatabase
MongoDBDatabaseNameforuserauthenticationincasewhenSecurityType'MONGODB-CR'isused.Thisisanoptionalvalue.
false none
Ssl UseSSLConnections false none
TofindoutallthepropertiesthataresupportedbythisMongoDBConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=mongodb)
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"
-
Tip install>/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/mongodb"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
TransactionsupportWithTeiid12.1runningagainstaMongoDBserver4+inareplicaset,youmayoptionallyuseLocalTransactiontransactionsupport.DoingsothroughtheCLIrequiresthecreationofanewresourceadapter.
batch/subsystem=resource-adapters/resource-adapter=mongodbLocal:add(transaction-support=LocalTransaction,module=org.jboss.teiid.resource-adapter.mongodb:main/subsystem=resource-adapters/resource-adapter=mongodbLocal/connection-definitions=mongodbLocal:add(jndi-name="java:/mongoDS",class-name=org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory,enabled=true,use-java-context=true)...runbatch
DeployingVDBDependencies
36
-
PhoenixDataSourcesThefollowingisaexampleforsettingupPhoenixDataSources,whichispreconditionforApachePhoenixTranslator.InadditiontotheDataSourcessetup,thisarticlealsocovermappingPhoenixtabletoanexistingHBasetableandcreatinganewPhoenixtable.
ThereareconfigurationtemplatesforPhoenixdatasourcesinthe"/docs/teiid/datasources"directory.AcompletedescriptionhowadatasourcecanbeaddedintoWildFlyisalsodescribedhere.
ConfiguringaPhoenixdatasourceinWildFly
ConfiguringaPhoenixdatasourceisnearlyidenticaltoconfiguringJDBCDataSources.ThefirststepisdeployingthePhoenixdriverjar.UsingbelowCLIcommandtodeployPhoenixdriver:
moduleadd--name=org.apache.phoenix--resources=/path/to/phoenix-[version]-client.jar--dependencies=javax.api,sun.jdk,org.apache.log4j,javax.transaction.api/subsystem=datasources/jdbc-driver=phoenix:add(driver-name=phoenix,driver-module-name=org.apache.phoenix,driver-class-name=org.apache.phoenix.jdbc.PhoenixDriver)
TheDriverjarcanbedownloadfromphoenixdocument.
ThesecondstepsiscreatingtheDataSourcebaseonabovedeployeddriver,whichisalsolikecreatingJDBCDataSource.UsingbelowCLIcommandtocreateDataSource:
/subsystem=datasources/data-source=phoenixDS:add(jndi-name=java:/phoenixDS,driver-name=phoenix,connection-url=jdbc:phoenix:{zookeeperquorumserver},enabled=true,use-java-context=true,user-name={user},password={password})/subsystem=datasources/data-source=phoenixDS/connection-properties=phoenix.connection.autoCommit:add(value=true)
PleasemakesuretheURL,Driver,andotherpropertiesareconfiguredcorrectly:
jndi-name-TheJNDInameneedtomatchtheJNDInameyouusedinVDB
driver-name-TheDrivernameneedtomatchthedriveryoudeployedinabovesteps
connection-url-TheURLneedtomatchtheHBasezookeeperquorumserver,theformatlikejdbc:phoenix[:[:][:]],’jdbc:phoenix:127.0.0.1:2181’isaexample
user-name/password-TheusercredentialsforPhoenixConnection
ThePhoenixConnectionAutoCommitdefaultisfalse.Setphoenix.connection.autoCommittotrueifyouwillbeexecutingINSERT/UPDATE/DELETEstatementsagainstPhoenix.
MappingPhoenixtabletoanexistingHBasetable
MappingPhoenixtabletoanexistingHBasetablehas2steps.Thefirststepisinstallingphoenix-[version]-server.jartotheclasspathofeveryHBaseregionserver.AneasywaytodothisistocopyitintotheHBaselib-formoredetailspleaserefertothephoenixdocumentation.
ThesecondstepisexecutingtheDDLtomapaPhoenixtabletoanexistingHBasetable.TheDDLcaneitherbeexecutedviaPhoenixCommandLine,orexecutedbyJDBC.
DeployingVDBDependencies
37
https://docs.jboss.org/author/display/WFLY10/DataSource+configurationhttp://phoenix.apache.org/http://phoenix.apache.org/download.htmlhttp://phoenix.apache.org/download.html
-
TheFollowingisaexampleformappinganexistingHBaseCustomerwiththefollowingstructure:
Asdepictedabove,theHBaseCustomertablehave2columnfamilies,customerandsales,andeachhas2columnqualifiers,name,city,productandamountrespectively.WecanmapthisTabletoPhoenixviaDDL:
CREATETABLEIFNOTEXISTS"Customer"("ROW_ID"VARCHARPRIMARYKEY,"customer"."city"VARCHAR,"customer"."name"VARCHAR,"sales"."amount"VARCHAR,"sales"."product"VARCHAR)
FormoreaboutmappingPhoenixtabletoanexistingHBasetablepleaserefertothephoenixdocumentation.
CreatinganewPhoenixtable
CreatinganewPhoenixtableisjustlikemappingtoanexistingHBasetable.Phoenixwillcreateanymetadata(table,columnfamilies)thatdonotexist.SimilartotheaboveexampletheDDLtocreatethePhoenix/HBaseCustomertablewouldbe:
CREATETABLEIFNOTEXISTS"Customer"("ROW_ID"VARCHARPRIMARYKEY,"customer"."city"VARCHAR,"customer"."name"VARCHAR,"sales"."amount"VARCHAR,"sales"."product"VARCHAR)
DefiningForeignTableinVDBFinally,weneeddefineaForeignTableinVDBthatmaptoPhoenixtable,thefollowingprinciplesshouldbeconsideredindefiningForeignTable:
nameinsourceoptioninTableusedtomatchPhoenixtablename
nameinsourceoptioninColumnusedtomatchHBaseTable’sColumns
createaprimarykeyisrecommended,theprimarykeycolumnshouldmatchPhoenixtable’sprimarykey/HBaserowid.
With"MappingPhoenixtabletoanexistingHBasetable"section’s`Customer'table,belowisaexample:
CREATEFOREIGNTABLECustomer(PKstringOPTIONS(nameinsource'ROW_ID'),citystringOPTIONS(nameinsource'"city"'),namestringOPTIONS(nameinsource'"name"'),amountstringOPTIONS(nameinsource'"amount"'),productstringOPTIONS(nameinsource'"product"'),CONSTRAINTPK0PRIMARYKEY(PK))OPTIONS(nameinsource'"Customer"',"UPDATABLE"'TRUE');
Note "Constraintviolation.Xmaynotbenull"exceptionmaythrownifupdatingatablewithoutdefiningaprimarykey.
DeployingVDBDependencies
38
http://phoenix.apache.org/faq.html#How_I_map_Phoenix_table_to_an_existing_HBase_table
-
DeployingVDBDependencies
39
-
SalesforceDataSourcesSalesforcedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.Therearethreeversionsofthesalesforceresourceadapter-salesforce,whichcurrentlyprovidesconnectivitytothe34.0SalesforceAPI,salesforce-34,whichprovidesconnectivitytothe34.0SalesforceAPI,andsalesforce-41whichactuallyprovidesaccessto37.0throughatleast45.0.Theversion22.0supporthasbeenremoved.
Note
IfyouneedconnectivitytoanAPIversionotherthanwhatisbuiltin,youmaytrytouseanexistingconnectivitypair,butinsomecircumstances-especiallyaccessingalaterremoteapifromanolderjavaapi-thisisnotpossibleandresultsinwhatappearstobehungconnections.PleaseraiseanissueifyoucannotsuccessfullyaccessaspecificAPIversion.
Therearemanywaystocreatethesalesforcedatasource,usingCLI,AdminAPI,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS:add(jndi-name=java:/sfDS,class-name=org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=URL:add(value=https://login.salesforce.com/services/Soap/u/34.0)/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=username:add(value={user})/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=password:add(value={password})/subsystem=resource-adapters/resource-adapter=salesforce:activaterunbatch
Thesalesforce-xxconnectiondefinitionconfigurationissimilartotheabove.Theresourceadapternamewouldinsteadbesalesforce-xx,andtheurlwouldpointtoalaterversion.Itisrecommendedtosettheurlexplicitly.The-34resourceadapterdefaultstohttps://login.salesforce.com/services/Soap/u/34.0,andthe-41resourceadapterdefaultstohttps://login.salesforce.com/services/Soap/u/40.0
Note thatifyouaccessanewerSalesforceAPIversionthantheresourceadaptersupports,youwillreceivelowlevelmetadataparsingexceptions-youcaneitheraccessanolderAPIorloganissuetohaveupdatedsupport.
TofindoutallthepropertiesthataresupportedbythisSalesforceConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=salesforce)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/salesforce"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
MutualAuthentication
IfyouneedtoconnecttoSalesforceusingMutualAuthentication,followthedirectionstosetupSalesforceathttps://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_USthenconfigurethebelowCXFconfigurationfileontheresource-adapterbyaddingfollowingpropertytoabovecliscript
DeployingVDBDependencies
40
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLIhttps://login.salesforce.com/services/Soap/u/34.0https://login.salesforce.com/services/Soap/u/40.0https://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_US
-
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=ConfigFile:add(value=${jboss.server.config.dir}/cxf-https.xml)
cxf-https.xml
moreinformationaboutCXFconfigurationfilecanbefoundathttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupport
OAuthSecuritywith"RefreshToken"
ThebelowlayoutthedirectionstouseRefreshTokenbasedOAuthAuthenticationwithSalesforce.
1)createconnectedapp(mayneedtosetupcustomdomain)2)addprofileand/orpermissionssettotheconnectedapp3)grabthe"callbackurl"(oneneedtosetashttps://localhost:443/_callback"4)Runthroughtheteiid-oauth-util.shin"/bin"directory,useclient_id,client_pass,andcallbackfromconnectedapp5)use"https://login.salesforce.com/services/oauth2/authorize"authorizelink6)use"https://login.salesforce.com/services/oauth2/token"foraccesstokenurl7)theyougetarefreshtokenfromit8)createasecurity-domainbyexecutingCLI
/subsystem=security/security-domain=oauth2-security:add(cache-type=default)/subsystem=security/security-domain=oauth2-security/authentication=classic:add/subsystem=security/security-domain=oauth2-security/authentication=classic/login-module=Kerberos:add(code=org.teiid.jboss.oauth.OAuth20LoginModule,flag=required,module=org.jboss.teiid.security,module-options=[client-id=xxxx,client-secret=xxxx,refresh-token=xxxx,access-token-uri=https://login.salesforce.com/services/oauth2/token])reload
thiswillgeneratefollowingXMLinthestandalone.xmlordomain.xml(thiscanalsobedirectlyaddedtothestandalone.xmlordomain.xmlfilesinsteadofexecutingtheCLI)
standalone.xml
DeployingVDBDependencies
41
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupporthttps://localhost:443/_callback
-
9)Thentousetheabovesecuritydomaininthesalesforcedatasourceconfiguration,add"oauth2-security"
OAuthSecuritywith"JWTToken"basedSteps
ThebelowlayoutthedirectionstouseJWTtokenbasedOAuthAuthenticationwithSalesforce.
1)CreateaSelf-SignedcertificatelocallyoronSalesForce.(user→setup→security-controls→CertificateandKeyManagement)2)Downloadthecertificateandalsoputinkeystoreanddownloadkeystore.KeystoreisneededforTeiid,certificateforthesalesforcesetup3)CreateconnectedappandselectOAuth,andselectallthescopes(somepostssayrefresh-tokenofflineismust)4)createaprofileand/orpermissionsetassigntotheconnectedapp.Ibelievebeforeyoucancreateaconnectedappyouneedtosetupcustomdomain5)Whenyoucreatingconnectedappmakesureyouaddthecertificatein"DigitalCertificate"6)NowinTeiidcreatesecurity-domainbyexecutingCLI
/subsystem=security/security-domain=oauth2-jwt-security:add(cache-type=default)/subsystem=security/security-domain=oauth2-jwt-security/authentication=classic:add/subsystem=security/security-domain=oauth2-jwt-security/authentication=classic/login-module=oauth:add(code=org.teiid.jboss.oauth.OAuth20LoginModule,flag=required,module=org.jboss.teiid.security,module-options=[client-id=xxxx,client-secret=xxxx,access-token-uri=https://login.salesforce.com/services/oauth2/token,jwt-audience=https://login.salesforce.com,[email protected],keystore-type=JKS,keystore-password=changeme,keystore-url=${jboss.server.config.dir}/salesforce.jks,certificate-alias=teiidtest,signature-algorithm-name=SHA256withRSA])reload
thiswillgeneratefollowingXMLinthestandalone.xmlordomain.xml(thiscanalsobedirectlyaddedtothestandalone.xmlordomain.xmlfilesinsteadofexecutingtheCLI)
standalone.xml
DeployingVDBDependencies
42
-
7)Thentousetheabovesecuritydomaininthesalesforcedatasourceconfiguration,add"oauth2-jwt-security"
Morehelpfullinks
https://developer.salesforce.com/blogs/developer-relations/2011/03/oauth-and-the-soap-api.htmlhttps://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US#create_tokenhttp://salesforce.stackexchange.com/questions/31904/how-and-when-does-a-salesforce-saml-oauth2-user-give-permission-to-use-a-connehttp://salesforce.stackexchange.com/questions/30596/oauth-2-0-jwt-bearer-token-flowhttp://salesforce.stackexchange.com/questions/88396/invalid-assertion-error-in-jwt-bearer-token-flow
Logging
Logging,whenenabled,willbeperformedatanINFOleveltotheorg.apache.cxf.interceptorcontext.
PerResourceAdapder
TheCXFconfigpropertymayalsobeusedtocontroltheloggingofrequestsandresponses.
Exampleloggingdatasource
NoTransactiontokenhttps://login.salesforce.com/services/Soap/u/34.0name/path/to/cxf.xml
Correspondingcxf.xml
Exampleloggingdatasource
DeployingVDBDependencies
43
https://developer.salesforce.com/blogs/developer-relations/2011/03/oauth-and-the-soap-api.htmlhttps://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US#create_tokenhttp://salesforce.stackexchange.com/questions/31904/how-and-when-does-a-salesforce-saml-oauth2-user-give-permission-to-use-a-connehttp://salesforce.stackexchange.com/questions/30596/oauth-2-0-jwt-bearer-token-flowhttp://salesforce.stackexchange.com/questions/88396/invalid-assertion-error-in-jwt-bearer-token-flow
-
AllCXFUsage
WiththeWildFlydistributionofCXFasystempropertycanbeusedtoenableCXFloggingacrossallusageintheapplicationserver-seetheWildFlydocs.
ExampleSystemProperty
DeployingVDBDependencies
44
https://docs.jboss.org/author/display/JBWS/Advanced+User+Guide
-
SolrDataSourcesSolrdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.TherearemanywaystocreateaSolrdatasource,usingCLI,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS:add(jndi-name=java:/solrDS,class-name=org.teiid.resource.adapter.solr.SolrManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS/config-properties=url:add(value=http://localhost:8983/solr/)/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS/config-properties=CoreName:add(value=collection1)/subsystem=resource-adapters/resource-adapter=solr:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisSolrConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=solr)
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/solr"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
45
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
WebServiceDataSourcesWebservicedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly15.0.1duringinstallation.Therearemanywaystocreatethefiledatasource,usingCLI,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectendpointandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=EndPoint:add(value={end_point})/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisWebServiceConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=webservice)
TheWebServiceDataSourcesupportsspecifyingaWSDLusingtheWsdlproperty.IftheWsdlpropertyisset,thentheServiceName,EndPointName,andNamespaceUripropertiesshouldalsobeset.TheWsdlpropertymaybeaURLorfilelocationortheWSDLtouse.
Tip
Developer’sTip-IfWildFly15.0.1isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/web-service"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
Allavailableconfigurationpropertiesofwebresource-adapter
PropertyName appliesto Required DefaultValue Description
EndPoint HTTP&SOAP false n/a
URLforHTTP,ServiceEndpointforSOAP.NotrequiredifusingHTTPinvokeproceduresthatspecifyabsoluteURLs.WillbeusedasthebaseURLifaninvokeprocedureusesarelativeURL.
SecurityType HTTP&SOAP false none
TypeofAuthenticationtousedwiththewebservice.Allowedvalues["None","HTTPBasic","WSSecurity","Kerberos","OAuth"]
AuthUserName HTTP&SOAP false n/aNamevalueforauthentication,usedinHTTPBasicandWsSecurity
AuthPassword HTTP&SOAP false n/aPasswordvalueforauthentication,usedinHTTPBasicandWsSecurity
DeployingVDBDependencies
46
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
ConfigFile HTTP&SOAP
false n/a CXFclientconfigurationFileorURL
EndPointName HTTP&SOAP false teiidLocalpartoftheendpointQNametousewiththisconnection,needstomatchonedefinedincxffile
ServiceName SOAP false n/a LocalpartoftheserviceQNametousewiththisconnection
NamespaceUri SOAP false http://teiid.org NamespaceURIoftheserviceQNametousewiththisconnection
RequestTimeout HTTP&SOAP false n/a Timeoutforrequest
ConnectTimeout HTTP&SOAP false n/a Timeoutforconnection
Wsdl SOAP false n/a WSDLfileorURLforthewebservice
CXFConfiguration
EachwebservicedatasourcemaychooseaparticularCXFconfigfileandportconfiguration.TheConfigFileconfigpropertyspecifiestheSpringXMLconfigurationfilefortheCXFBusandportconfigurationtobeusedbyconnections.Ifnoconfigfileisspecifiedthenthesystemdefaultconfigurationwillbeused.
Only1portconfigurationcanbeusedbythisdatasource.YoumayexplicitlysetthelocalnameoftheportQNametouseviatheConfigNameproperty.ThenamespaceURIfortheQNameinyourconfigfileshouldmatchyourWSDL/namespacesettingonthedatasourceorusethedefaultofhttp://teiid.org.SeetheCXFDocumentationandthesectionsbelowonWS-Security,Logging,etc.forexamplesofusingtheCXFconfigurationfile.
SampleSpringXMLConfigurationToSetTimeouts
Intheconduitname{http://teiid.org[http://teiid.org]}configName.http-conduit,thenamespace,{http://teiid.org[http://teiid.org]},maybesetviathenamespacedatasourceproperty.Typicallythatwillonlyneeddonewhenalsosupplyingthewsdlsetting.Thelocalnameisfollowedby.http-conduit.ItwillbebasedupontheconfigNamesetting,withadefaultvalueofteiid.
SeetheCXFdocumentationforallpossibleconfigurationoptions.
Note ItisnotrequiredtousetheSpringconfigurationtosetjusttimeouts.TheConnectionTimeoutandReceiveTimeoutcanbesetviatheresourceadapterconnectTimeoutandrequestTimeoutpropertiesrespectively.
DeployingVDBDependencies
47
http://teiid.orghttp://teiid.orghttp://cxf.apache.org/docs/configuration.htmlhttp://teiid.orghttp://teiid.orghttp://cxf.apache.org/docs/
-
Security
ToenabletheuseofWS-Security,theSecurityTypeshouldbesettoWSSecurity.AtthistimeTeiiddoesnotexpectaWSDLtodescribetheservicebeingused.ThusaSpringXMLconfigurationfileisnotonlyrequired,itmustinsteadcontainalloftherelevantpolicyconfiguration.Andjustaswiththegeneralconfiguration,eachdatasourceislimitedtospecifyingonlyasingleportconfigurationtouse.
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=SecurityType:add(value=WSSecurity)/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
Thecorrespondingxxx-jbossws-cxf.xmlfilethataddsatimestamptotheSOAPheader
ExampleWS-Securityenableddatasource
NotethattheclientportconfigurationismatchedtothedatasourceinstancebytheQName{http://teiid.org}port_x,wherethenamespacewillmatchyournamespacesettingorthedefaultofhttp://teiid.org.Theconfigurationmaycontainotherportconfigurationswithdifferentlocalnames.
FormoreinformationonconfiguringCXFinterceptors,pleaseconsulttheCXFdocumentation
Kerberos
DeployingVDBDependencies
48
http://teiid.orghttp://cxf.apache.org/docs/security.html
-
WS-SecurityKerberosisonlysupportedwhentheWSDLpropertyisdefinedinresource-adapterconnectionconfigurationandonlywhenWSDLBasedProceduresareused.WSDLfilemustcontainWS-Policysection,thenWS-Policysectioniscorrectlyinterpretedandenforcedontheendpoint.ThesampleCXFconfigurationwilllooklike
andyouwouldneedtoconfigurethesecurity-domaininthestandalone-teiid.xmlfileunderthe'security'subsystemas
forcompletelistofkerberospropertiespleaserefertothistestcase
Logging
Logging,whenenabled,willbeperformedatanINFOleveltotheorg.apache.cxf.interceptorcontext.
DeployingVDBDependencies
49
http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
-
SOAP
TheCXFconfigpropertymayalsobeusedtocontroltheloggingofrequestsandresponsesforspecificorallports.
Exampleloggingdatasource
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
Correspondingxxx-jbossws-cxf.xml
Exampleloggingdatasource
AllCXFUsage
WiththeWildFlydistributionofCXFasystempropertycanbeusedtoenableCXFloggingacrossallusageintheapplicationserver(includingsalesforce)-seetheWildFlydocs.
ExampleSystemProperty
TransportSettings
TheCXFconfigpropertymayalsobeusedtocontrollowlevelaspectsoftheHTTPtransport.SeetheCXFdocumentationforallpossibleoptions.
DeployingVDBDependencies
50
https://docs.jboss.org/author/display/JBWS/Advanced+User+Guidehttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
-
ExampleDisablingHostnameVerification
ConfiguringSSLSupport(Https)ForusingtheHTTPS,youcanconfigureCXFfileasbelow
forallthehttp-conduitbasedconfigurationseehttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html.YoucanalsoconfigureforHTTPBasic,kerberos,etc.
DeployingVDBDependencies
51
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
-
KerberoswithRESTbasedServices
Note "Kerberosinws-securitywithSOAPservices"-
CheckoutthecxfconfigurationtoallowKerberosinSOAPwebservicesathttp://cxf.apache.org/docs/security.html
ThekerberossupportisbasedSPNEGOasdescribedinhttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentication%28Kerberos%29.Theretwotypesofkerberossupport
Negotiation
Withthisconfiguration,RESTserviceisconfiguredwithKerberosJAASdomain,tonegotiateatoken,thenuseitaccessthewebservice.Forthisfirstcreateasecuritydomaininstandalone.xmlfileasbelow
andthejboss-cxf-xxx.xmlfileneedstobesetas
NegotiateMY_REALM
Theresourceadaptercreationneedstodefinethefollowingproperties
path/to/jboss-cxf-xxxx.xmltest
NoteEventhoughaboveconfigurationconfiguresthevalueof"ConfigName",thecxfframeworkcurrentlyinthecaseofJAX-RSclientdoesnotgiveoptiontouseit.Forthatreasonuse"*.http-conduit"whichwillapplytoalltheHTTPcommunicationsunderthisresourceadapter.
DeployingVDBDependencies
52
http://cxf.apache.org/docs/security.htmlhttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentication%28Kerberos%29
-
Delegation
IfincasetheuserisalreadyloggedintoTeiidusingKerberosusingJDBC/ODBCorusedSPNEGOinweb-tierandusedpass-throughauthenticationintoTeiid,thenthereisnoneedtonegotiateanewtokenfortheKerberos.Thesystemcandelegatetheexistingtoken.
Toconfigurefordelegation,setupsecuritydomaindefinedexactlyasdefinedin"negotiation",andjboss-cxf-xxx.xmlfile,howeverremovethefollowinglinefromjboss-cxf-xxx.xmlfile,asitisnotgoingtonegotiatenewtoken.
MY_REALM
Addthefollowingpropertiesinwebserviceresourceadaptercreation.Oneconfiguresthat"kerberos"securitybeingused,theseconddefinesasecuritydomaintobeusedatthedatasource,inthiscasewewanttouseasecuritydomainthatpassesthroughaloggedinuser
Kerberospassthrough-security
Toconfigurein"passthrough-security"securitydomain,the"security"subsystemaddfollowingXMLfragment
IfincasethereisnodelegationCredentialisavailableonthecontext,theaccesswillfail.
DeployingVDBDependencies
53
-
OAuthAuthenticationWithRESTBasedServices
SingleuserOAuthauthentication
WebServicesresource-adaptercanbeconfiguredtoparticipateinOAuth1.0aandOAuth2authenticationschemes.UsingTeiidalongwith"ws"translatorand"web-services"resourceadapteroncewriteapplicationscommunicatingwithwebsiteslikeGoogleandTwitter.
InordertosupportOAuthauthentication,thereissomepreparationandconfigurationworkinvolved.IndividualwebsitestypicallyprovidedeveloperfacingRESTbasedAPIsforaccessingtheircontentonthewebsitesandalsoprovidewaystoregistercustomapplicationsonuser’sbehalf,wheretheycanmanagetheAuthorizationofservicesofferedbythewebsite.Thefirststepistoregisterthiscustomapplicationonthewebsiteandcollectconsumer/APIkeysandsecrets.Theweb-siteswillalsolisttheURLS,wheretorequestforvariousdifferenttypesoftokensforauthorizationusingthesecredentials.AtypicalOAuthauthenticationflowisdefinedasbelow
Theaboveimagetakenfromhttps://developers.google.com/accounts/docs/OAuth2
Toaccommodateabovedefinedflow,Teiidprovidesautilitycalled"teiid-oauth-util.sh"or"teiid-oauth-util.bat"forwindowsinthe"bin"directoryofyourserverinstallation.Byexecutingthisutility,itwillaskforvariouskeys/secretsandURLsforthegeneratingtheAccessTokenthatisusedintheOAuthauthenticationandintheendoutputaXMLfragmentlikebelow.
$./teiid-oauth-util.shSelecttypeofOAuthauthentication1)OAuth1.0A2)OAuth2.0
2===OAuth2.0Workflow===
DeployingVDBDependencies
54
http://oauth.orghttp://google.comhttp://twitter.comhttps://developers.google.com/accounts/docs/OAuth2
-
EntertheClientID=10-xxxjb.apps.googleusercontent.com
EntertheClientSecret=3L6-xxx-v9xxDlznWq-o
EntertheUserAuthorizationURL=https://accounts.google.com/o/oauth2/auth
Enterscope(hitenterfornone)=profile
Cut&PastetheURLinawebbrowser,andAuthticateAuthorizeURL=https://accounts.google.com/o/oauth2/auth?client_id=10-xxxjb.apps.googleusercontent.com&scope=profile&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state=Auth+URL
EnterTokenSecret(AuthCode,Pin)frompreviousstep=4/z-RT632cr2hf_vYoXd06yIM-xxxxx
EntertheAccessTokenURL=https://www.googleapis.com/oauth2/v3/token
RefreshToken=1/xxxx_5qzAF52j-EmN2U
AddthefollowingXMLintoyourstandalone-teiid.xmlfileinsecurity-domainssubsystem,andconfiguredatasourcesecurtytothisdomain
TheXMLfragmentattheenddefinestheJAASLoginModuleconfiguration,editthestandalone-teiid.xmlandadditunder"security-domains"subsystem.Userneedstousethissecurity-domainintheirresourceadapterasthesecurityproviderforthisdatasource.Anexampleresource-adapterconfigurationtodefinethedatasourcetothewebsiteinstandalone-teiid.xmlfilelookslike
NoTransactionOAuth
DeployingVDBDependencies
55
-
oauth2-security
---
Then,anyquerywrittenusingthe"ws"translatorandaboveresource-adapterwillbeautomaticallyAuthorizedwiththetargetwebsiteusingOAuth,whenyouaccessaprotectedURL.
===OAuthwithDelegation
Intheaboveconfigurationasingleuserisconfiguredtoaccessthewebsite,howeverifyouwanttodelegateloggedinuser’scredentialasOAuthauthentication,thenuserneedstoextendtheaboveLoginModule_(org.teiid.jboss.oauth.OAuth20LoginModuleororg.teiid.jboss.oauth.OAuth10LoginModule)_andautomatetheprocessdefinedinthe"teiid-oauth-util.sh"todefinetheAccessTokendetailsdynamically.Sincethisprocesswillbedifferentfordifferentwebsites(itinvolvesloginandauthentication),Teiidwillnotbeabletoprovidesinglesolution.However,usercanextendtheloginmoduletoprovidethisfeaturemuchmoreeasilysincetheywillbeworkingwithtargetedwebsites.
DeployingVDBDependencies
56
-
VDBVersioningVDBVersioningisafeaturethatallowsmultipleversionsofaVDBtobedeployedatthesametimewithadditionalsupporttodeterminewhichversionwillbeused.Ifaspecificversionisrequested,thenonlythatVDBmaybeconnectedto.Ifnoversionisset,thenthedeployedVDBsaresearchedfortheappropriateversion.Thisfeaturehelpssupportmorefluidmigrationscenarios.
VersionProperty
WhenauserconnectstoTeiidthedesiredVDBversioncanbesetasaconnectionproperty(SeetheClientDeveloper’sGuide)inJDBCorusedaspartoftheVDBnameforODataandODBCaccess.
Thevdbversionissetineitherthevdb.xxxorthroughanamingconventionofthedeploymentname-vdbname.version.vdb,e.g.marketdata.2.vdb.Thedeployerisresponsibleforchoosinganappropriateversionnumber.IfthereisalreadyaVDBname/versionthatmatchesthecurrentdeployment,thenconnectionstothepreviousVDBwillbeterminatedanditscacheentrieswillbeflushed.AnynewconnectionswillthenbemadetothenewVDB.
NoteWhensettingtheversioninthevdb.xmlorddlfileauniquedeploymentnamemuststillbeusedasthatisthenametheapplicationserverinternallyusesforthedeployment.Usingthesamedeploymentnameasapreviousversionwillsimplyoverwritetheolderdeployment.
AsimpleintegerversionactuallytreatedasthesemanticversionX.0.0.Ifdesiredafullsemanticversioncanbeusedinstead.Asemanticversionisuptothreeintegersseparatedbyperiods.
Trailingversioncomponentsthataremissingaretreatedaszeros-version1isthesameas1.0.0andversion1.1isthesameas1.1.0.
JDBCandODBCclientsmayuseaversionrestriction--vdbname.X.orvdbname.X.X.-notethetrailing'.'whichmeansaVDBthatmustmatchthepartialversionspecified.Forexamplevdbname.1.2.couldmatchany1.2.Xversion,butwouldnotallow1.3+or1.1andearlier.
ConnectionType
OncedeployedaVDBhasanupdatablepropertycalledconnectiontype,whichisusedtodeterminewhatconnectionscanbemadetotheVDB.Theconnectiontypecanbeoneof:
NONE-disallownewconnections.
BY_VERSION-thedefaultsetting.AllowconnectionsonlyiftheversionisspecifiedorifthisistheearliestBY_VERSIONvdbandtherearenovdbsmarkedasANY.
ANY-allowconnectionswithorwithoutaversionspecified.
TheconnectiontypemaybechangedeitherthroughtheAdminConsoleortheAdminAPI.
Deployme